org.entityfs.zip
Class ZipFileAdapter

java.lang.Object
  extended by org.entityfs.impl.impl.adapter.AbstractROEntityAdapter<ZipFileSystemAdapter,ZipDirectoryAdapter>
      extended by org.entityfs.zip.ZipFileAdapter
All Implemented Interfaces:
EntityAdapter, FileAdapter, ZipEntityAdapter

public class ZipFileAdapter
extends AbstractROEntityAdapter<ZipFileSystemAdapter,ZipDirectoryAdapter>
implements FileAdapter, ZipEntityAdapter


Constructor Summary
ZipFileAdapter(ZipFileSystemAdapter fs, ZipDirectoryAdapter parent, String name, ZipEntry entry)
           
 
Method Summary
 void copyFrom(ReadableByteChannel rbc)
           
 void copyTo(OutputStream os)
           
 void copyTo(WritableByteChannel wbc)
           
 long getDataSize()
           
 EntityType getEntityType()
           
 long getLastModified()
           
 long getSize()
           
 ZipEntry getZipEntry()
           
 ReadableByteChannel openChannelForRead()
           
 FileChannel openChannelForWrite(boolean append)
           
 RandomAccess openForRandomAccess(RandomAccessMode mode)
           
 InputStream openForRead()
           
 OutputStream openForWrite(boolean append)
           
 void replaceContents(FileAdapter fa)
           
 
Methods inherited from class org.entityfs.impl.impl.adapter.AbstractROEntityAdapter
assertCanBeDeleted, canWrite, create, delete, getName, getParent, rename, setLastModified
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.entityfs.zip.ZipEntityAdapter
getZipEntry
 
Methods inherited from interface org.entityfs.impl.adapter.EntityAdapter
canRead, canWrite, create, delete, exists, getFileSystemAdapter, getLastModified, getName, getParent, init, rename, setLastModified
 

Constructor Detail

ZipFileAdapter

public ZipFileAdapter(ZipFileSystemAdapter fs,
                      ZipDirectoryAdapter parent,
                      String name,
                      ZipEntry entry)
Method Detail

copyTo

public void copyTo(OutputStream os)
Specified by:
copyTo in interface FileAdapter

copyTo

public void copyTo(WritableByteChannel wbc)
Specified by:
copyTo in interface FileAdapter

copyFrom

public void copyFrom(ReadableByteChannel rbc)

openForWrite

public OutputStream openForWrite(boolean append)
Specified by:
openForWrite in interface FileAdapter

openChannelForWrite

public FileChannel openChannelForWrite(boolean append)
Specified by:
openChannelForWrite in interface FileAdapter

openForRandomAccess

public RandomAccess openForRandomAccess(RandomAccessMode mode)
Specified by:
openForRandomAccess in interface FileAdapter

getSize

public long getSize()
Specified by:
getSize in interface FileAdapter

getDataSize

public long getDataSize()
Specified by:
getDataSize in interface FileAdapter

openForRead

public InputStream openForRead()
Specified by:
openForRead in interface FileAdapter

openChannelForRead

public ReadableByteChannel openChannelForRead()
Specified by:
openChannelForRead in interface FileAdapter

getEntityType

public EntityType getEntityType()
Specified by:
getEntityType in interface EntityAdapter

replaceContents

public void replaceContents(FileAdapter fa)
Specified by:
replaceContents in interface FileAdapter

getZipEntry

public ZipEntry getZipEntry()

getLastModified

public long getLastModified()
Specified by:
getLastModified in interface EntityAdapter