org.entityfs.zip
Class ZipFileSystemAdapter
java.lang.Object
org.entityfs.impl.impl.adapter.AbstractFileSystemAdapter
org.entityfs.zip.ZipFileSystemAdapter
- All Implemented Interfaces:
- FileSystemAdapter
public class ZipFileSystemAdapter
- extends AbstractFileSystemAdapter
ZipFileSystemAdapter
public ZipFileSystemAdapter(LogAdapterHolder lah,
Map<AbsoluteLocation,org.entityfs.zip.ZipFileDirectoryNode> nodeLocationMap,
ZipFile zf,
int bufSize)
isCaseSensitive
public boolean isCaseSensitive()
getDirectoryNode
public org.entityfs.zip.ZipFileDirectoryNode getDirectoryNode(AbsoluteLocation loc)
- This is used by the
FSACZipEntries
capability.
- Returns:
- The Zip file tree node that corresponds to the given location.
This may be null for a non-existing node.
containsNode
public boolean containsNode(AbsoluteLocation loc)
getZipFile
public ZipFile getZipFile()
getEntityType
public EntityType getEntityType(AbsoluteLocation loc)
- Get the type of the entity at the specified location. If the
ZipFile
does not contain any entry at the supplied location, this is
interpreted as a directory entry.
- Parameters:
loc
- The location of the entity.
getZipEntry
public ZipEntry getZipEntry(AbsoluteLocation loc)
- Get the
ZipEntry
for the supplied location. For directories, this
may return null
.
- Parameters:
loc
- The location to get the ZipEntry
for.
- Returns:
- The
ZipEntry
or null
.
registerDirectoryAdapter
public void registerDirectoryAdapter(ZipDirectoryAdapter da,
AbsoluteLocation loc)
- When a directory adapter is created, it is registered (through the
FSACZipEntries
capability) so that its location can be looked up
when creating its child entity adapters.
- Parameters:
da
- The directory adapterloc
- The directory adapter's location
getDirectoryAdapterLocation
public AbsoluteLocation getDirectoryAdapterLocation(ZipDirectoryAdapter da)
close
public void close()
- Specified by:
close
in interface FileSystemAdapter
- Overrides:
close
in class AbstractFileSystemAdapter
finalize
protected void finalize()
throws Throwable
- Overrides:
finalize
in class Object
- Throws:
Throwable