|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--uk.org.ogsadai.activity.transform.ZIPIncrementalProcessor
An IncrementalProcessor to produce ZIP archives.
| Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICECopyright statement |
private static int |
DEFAULT_BUFFER_SIZEDefault buffer size |
private static DAILogger |
LOGLogger object for logging in this class |
private boolean |
mActiveIndicates whether or not there is more processing to be done. |
private byte[] |
mBufferInternal buffer. |
private java.util.zip.Checksum |
mChecksumThe checksum used for the archiving. |
private java.lang.String |
mCommentThe comment to store with the archive. |
private java.io.InputStream |
mCurrentInputReferences the input that is currently being processed. |
private java.util.Map |
mEntryMapMaps entry names to input streams. |
private java.util.Iterator |
mEntryNamesUsed to iterate over the entry names in mEntryMap. |
private static int |
METHODThis specifies the archiving method. |
private int |
mLevelThe compression level. |
private java.util.zip.ZipOutputStream |
mOutputThe archived output is written here. |
| Constructor Summary | |
ZIPIncrementalProcessor()Constructs an instance with the default internal buffer size. |
|
ZIPIncrementalProcessor(int bufferSize)Constructs an instance with the specified internal buffer size. |
|
| Method Summary | |
boolean |
active()Indicates whether or not processing is complete. |
void |
close()Closes the IncrementalProcessor, freeing up any resources. |
void |
initialise(java.io.OutputStream output)Initialises the instance to process to the specified output. |
private void |
initialiseNextEntry()Initialise the next entry for the ZIP archive. |
void |
process()Performs some processing that may write data to the OutputStream that the instance was initialised with. |
void |
setChecksum(java.util.zip.Checksum checksum)Sets the checksum object to use with the archiving operation. |
void |
setComment(java.lang.String comment) |
void |
setEntryMap(java.util.Map entryMap)Sets the ZIP entries. |
void |
setLevel(int level) |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final java.lang.String COPYRIGHT_NOTICE
private static final DAILogger LOG
private java.util.zip.ZipOutputStream mOutput
private java.util.zip.Checksum mChecksum
private java.util.Map mEntryMap
private java.util.Iterator mEntryNames
private java.io.InputStream mCurrentInput
private java.lang.String mComment
private static final int METHOD
private int mLevel
private boolean mActive
private byte[] mBuffer
private static final int DEFAULT_BUFFER_SIZE
| Constructor Detail |
public ZIPIncrementalProcessor()
public ZIPIncrementalProcessor(int bufferSize)
bufferSize - The size of the bufferjava.lang.IllegalArgumentException - If bufferSize <= 0.| Method Detail |
public void setEntryMap(java.util.Map entryMap)
entryMap - A Map mapping entry name to entry java.io.InputStreams.java.lang.IllegalArgumentException - If entryMap is null or has length 0 or contains entries that are not java.io.InputStreams.public void setChecksum(java.util.zip.Checksum checksum)
checksum - The Checksum to use for the archiving operation. If this is null then no checksum is used.public void setComment(java.lang.String comment)
public void setLevel(int level)
public void initialise(java.io.OutputStream output)
IncrementalProcessorinitialise in interface IncrementalProcessoroutput - The OutputStreampublic boolean active()
IncrementalProcessorprocess method.
active in interface IncrementalProcessortrue if processing is not complete, otherwise false.
public void process()
throws java.io.IOException
IncrementalProcessorOutputStream that the instance was initialised with.
process in interface IncrementalProcessorjava.io.IOException - If there is an I/O problem.
private void initialiseNextEntry()
throws java.io.IOException
java.io.IOException - If any problem arises.
public void close()
throws java.io.IOException
IncrementalProcessorIncrementalProcessor, freeing up any resources.
close in interface IncrementalProcessorjava.io.IOException - If there is an I/O problem.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||