com.mucommander.file.impl.lst
Class LstArchiveFile

java.lang.Object
  extended by com.mucommander.file.AbstractFile
      extended by com.mucommander.file.impl.ProxyFile
          extended by com.mucommander.file.AbstractArchiveFile
              extended by com.mucommander.file.AbstractROArchiveFile
                  extended by com.mucommander.file.impl.lst.LstArchiveFile
All Implemented Interfaces:
PermissionAccesses, PermissionTypes

public class LstArchiveFile
extends AbstractROArchiveFile

IsoArchiveFile provides read-only access to archives in the LST format made popular by Total Commander.

Entries are parsed from the .lst file and can be read (an InputStream to them can be opened) if the file exists locally.

For reference, here's a short LST file:

 c:\
 cygwin\        0       2006.10.2       19:35.2
 cygwin.bat     57      2006.10.2       19:34.58
 cygwin.ico     7022    2006.10.2       19:40.52
 cygwin\bin\    0       2006.10.2       19:40.52
 addftinfo.exe  67072   2002.12.16      10:3.24
 afmtodit       8544    2002.12.16      10:3.22
 apropos        1786    2005.5.4        2:12.50
 ascii.exe      7168    2006.3.20       20:44.24
 ash.exe        74240   2004.1.27       2:14.20
 awk.exe        19      2006.10.2       19:34.4
 

Author:
Maxence Bernard
See Also:
LstFormatProvider

Field Summary
 
Fields inherited from class com.mucommander.file.AbstractArchiveFile
entryTreeDate, entryTreeRoot
 
Fields inherited from class com.mucommander.file.impl.ProxyFile
file
 
Fields inherited from class com.mucommander.file.AbstractFile
DEFAULT_SEPARATOR, fileURL, IO_BUFFER_SIZE, MUST_HINT, MUST_NOT_HINT, SHOULD_HINT, SHOULD_NOT_HINT, windowsDriveRootPattern
 
Fields inherited from interface com.mucommander.file.PermissionTypes
EXECUTE_PERMISSION, READ_PERMISSION, WRITE_PERMISSION
 
Fields inherited from interface com.mucommander.file.PermissionAccesses
GROUP_ACCESS, OTHER_ACCESS, USER_ACCESS
 
Constructor Summary
LstArchiveFile(AbstractFile file)
           
 
Method Summary
 java.util.Vector getEntries()
          Returns a Vector of ArchiveEntry, representing all the entries this archive file contains.
 java.io.InputStream getEntryInputStream(ArchiveEntry entry)
          Returns an InputStream to read from the given archive entry.
 
Methods inherited from class com.mucommander.file.AbstractROArchiveFile
isWritableArchive
 
Methods inherited from class com.mucommander.file.AbstractArchiveFile
addToEntriesTree, canRunProcess, checkEntriesTree, createEntriesTree, declareEntriesTreeUpToDate, getArchiveEntryFile, getArchiveEntryFile, getFreeSpace, isBrowsable, isDirectory, ls, ls, ls, ls, ls, removeFromEntriesTree, runProcess
 
Methods inherited from class com.mucommander.file.impl.ProxyFile
canChangeDate, canGetGroup, canGetOwner, changeDate, changePermission, changePermissions, copyStream, copyTo, delete, deleteRecursively, equals, exists, getAbsolutePath, getCanonicalFile, getCanonicalPath, getChangeablePermissions, getCopyToHint, getDate, getExtension, getGroup, getInputStream, getInputStream, getJavaNetURL, getMoveToHint, getName, getOutputStream, getOwner, getParent, getPermissions, getPermissionsString, getProxiedFile, getRandomAccessInputStream, getRandomAccessOutputStream, getRoot, getSeparator, getSize, getTotalSpace, getUnderlyingFileObject, getURL, hashCode, hasRandomAccessInputStream, hasRandomAccessOutputStream, importPermissions, importPermissions, isHidden, isRoot, isSymlink, mkdir, mkfile, moveTo, setParent, toString
 
Methods inherited from class com.mucommander.file.AbstractFile
addTrailingSeparator, calculateChecksum, calculateChecksum, calculateChecksum, changePermissions, checkCopyPrerequisites, copyRecursively, deleteRecursively, getAbsolutePath, getAncestor, getAncestor, getCanonicalPath, getChild, getChildSilently, getDirectChild, getExtension, getIcon, getIcon, getNameWithoutExtension, getParentArchive, getParentSilently, getTopAncestor, hasAncestor, hasAncestor, isParentOf, mkdir, mkdirs, mkfile, removeTrailingSeparator
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LstArchiveFile

public LstArchiveFile(AbstractFile file)
Method Detail

getEntries

public java.util.Vector getEntries()
                            throws java.io.IOException
Description copied from class: AbstractArchiveFile
Returns a Vector of ArchiveEntry, representing all the entries this archive file contains. This method will be called the first time one of the ls() is called. If will not be further called, unless the file's date has changed since the last time one of the ls() methods was called.

Specified by:
getEntries in class AbstractArchiveFile
Throws:
java.io.IOException

getEntryInputStream

public java.io.InputStream getEntryInputStream(ArchiveEntry entry)
                                        throws java.io.IOException
Description copied from class: AbstractArchiveFile
Returns an InputStream to read from the given archive entry. The specified ArchiveEntry instance is necessarily one of the entries that were returned by AbstractArchiveFile.getEntries().

Specified by:
getEntryInputStream in class AbstractArchiveFile
Throws:
java.io.IOException


This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard