|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.org.ogsadai.activity.transform.GZIPIncrementalProcessor
An IncrementalProcessor
that reads from an InputStream
, compresses the data using GZIP compression, and writes to an OutputStream
.
Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE Copyright statement |
private static int |
DEFAULT_BUFFER_SIZE Default buffer size |
private boolean |
mActive Indicates whether or not there is more processing to be done. |
private byte[] |
mBuffer Used as a buffer between the input and output stream. |
private java.util.zip.Checksum |
mChecksum References the checksum or null if no checksum is being used. |
private java.io.InputStream |
mInput Data is read from this stream and written to the output stream |
private java.util.zip.GZIPOutputStream |
mOutput Data read from the input is written to this stream |
Constructor Summary | |
GZIPIncrementalProcessor(java.io.InputStream input, java.util.zip.Checksum checksum) Constructs an instance with the specified settings and default internal buffer size. |
|
GZIPIncrementalProcessor(java.io.InputStream input, java.util.zip.Checksum checksum, int bufferSize) Constructs an instance with the specified settings. |
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. |
void |
process() Performs some processing that may write data to the OutputStream that the instance was initialised with. |
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 java.io.InputStream mInput
private java.util.zip.GZIPOutputStream mOutput
private java.util.zip.Checksum mChecksum
null
if no checksum is being used.
private boolean mActive
private byte[] mBuffer
private static final int DEFAULT_BUFFER_SIZE
Constructor Detail |
public GZIPIncrementalProcessor(java.io.InputStream input, java.util.zip.Checksum checksum)
input
- The InputStream
to read data from.checksum
- The Checksum
object to use for the compression or null
if no checksum is to be calculated.public GZIPIncrementalProcessor(java.io.InputStream input, java.util.zip.Checksum checksum, int bufferSize)
input
- The InputStream
to read data from.checksum
- The Checksum
object to use for the compression or null
if no checksum is to be calculated.bufferSize
- The size of the internal buffer used for each increment.Method Detail |
public void initialise(java.io.OutputStream output) throws java.io.IOException
IncrementalProcessor
initialise
in interface IncrementalProcessor
output
- The OutputStream
java.io.IOException
- If there is an I/O problem.public boolean active()
IncrementalProcessor
process
method.
active
in interface IncrementalProcessor
true
if processing is not complete, otherwise false
.public void process() throws java.io.IOException
IncrementalProcessor
OutputStream
that the instance was initialised with.
process
in interface IncrementalProcessor
java.io.IOException
- If there is an I/O problem.public void close() throws java.io.IOException
IncrementalProcessor
IncrementalProcessor
, freeing up any resources.
close
in interface IncrementalProcessor
java.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 |