com.myJava.file.archive
Class AbstractArchiveAdapter

java.lang.Object
  extended by com.myJava.file.archive.AbstractArchiveAdapter
All Implemented Interfaces:
ArchiveAdapter
Direct Known Subclasses:
ZipArchiveAdapter

public abstract class AbstractArchiveAdapter
extends java.lang.Object
implements ArchiveAdapter


Author:
Olivier PETRUCCI

Areca Build ID : 7299034069467778562

Field Summary
protected  short accessMode
           
protected  long entryCount
           
protected  java.io.InputStream zin
           
protected  java.io.OutputStream zout
           
 
Fields inherited from interface com.myJava.file.archive.ArchiveAdapter
ACCESS_READ, ACCESS_UNDEF, ACCESS_WRITE
 
Constructor Summary
AbstractArchiveAdapter(short accessMode, long estimatedLength)
          Constructor.
 
Method Summary
 void addEntry(java.lang.String entryName, long size)
          Adds a new Entry
 void close()
          Closes the archive
 java.io.InputStream getArchiveInputStream()
          Returns the inputStream that can be used to read data
 java.io.OutputStream getArchiveOutputStream()
          Returns the outputStream that can be used to write data
protected  boolean isReader()
           
protected  boolean isWriter()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.myJava.file.archive.ArchiveAdapter
closeEntry, getNextEntry, setArchiveComment, setCharset
 

Field Detail

accessMode

protected short accessMode

entryCount

protected long entryCount

zin

protected java.io.InputStream zin

zout

protected java.io.OutputStream zout
Constructor Detail

AbstractArchiveAdapter

public AbstractArchiveAdapter(short accessMode,
                              long estimatedLength)
Constructor.
The case where "estimatedLength" == 0 must be managed carefully by subclasses.

Method Detail

isWriter

protected boolean isWriter()

isReader

protected boolean isReader()

addEntry

public void addEntry(java.lang.String entryName,
                     long size)
              throws java.io.IOException
Description copied from interface: ArchiveAdapter
Adds a new Entry

Specified by:
addEntry in interface ArchiveAdapter
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Description copied from interface: ArchiveAdapter
Closes the archive

Specified by:
close in interface ArchiveAdapter
Throws:
java.io.IOException

getArchiveInputStream

public java.io.InputStream getArchiveInputStream()
Description copied from interface: ArchiveAdapter
Returns the inputStream that can be used to read data

Specified by:
getArchiveInputStream in interface ArchiveAdapter

getArchiveOutputStream

public java.io.OutputStream getArchiveOutputStream()
Description copied from interface: ArchiveAdapter
Returns the outputStream that can be used to write data

Specified by:
getArchiveOutputStream in interface ArchiveAdapter