|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.OutputStream
de.enough.polish.util.zip.GZipOutputStream
public class GZipOutputStream
Generates GZIP or DEFLATE encoded input streams from an InputStream.
Copyright Enough Software 2007 - 2010
history
Jun 28, 2007 - Simon creation
| Field Summary | |
|---|---|
static int |
TYPE_DEFLATE
This constant triggers the normal deflate compression as described in rfc 1951. |
static int |
TYPE_GZIP
This constant triggers the gzip compression that is the same as deflate with some extra header information (see rfc 1952). |
| Constructor Summary | |
|---|---|
GZipOutputStream(OutputStream outputStream,
int size,
int compressionType,
int plainWindowSize,
int huffmanWindowSize)
|
|
| Method Summary | |
|---|---|
void |
close()
|
void |
flush()
It is strongly recomended NOT to call flush before close() since close() is able to handle the flushing better itself. |
void |
write(byte[] b)
|
void |
write(byte[] b,
int off,
int len)
|
void |
write(int b)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int TYPE_DEFLATE
public static final int TYPE_GZIP
| Constructor Detail |
|---|
public GZipOutputStream(OutputStream outputStream,
int size,
int compressionType,
int plainWindowSize,
int huffmanWindowSize)
throws IOException
outputStream - stream to write the compressed data insize - prefered size of the internal buffercompressionType - TYPE_GZIP or TYPE_DEFLATEplainWindowSize - this size is important for the lz77 search. Larger values
will result in better compression. Maximum is 32768.huffmanWindowSize - this size is important for the huffmanencoding. A large
value will result to a better frequency statistic and therefore to a better compression.
IOException - might be thrown in case that the inputStream can not be read,
the outputStream can not be written into or in case of wrong argumentsTYPE_DEFLATE,
TYPE_GZIP| Method Detail |
|---|
public void close()
throws IOException
close in interface Closeableclose in class OutputStreamIOException
public void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOException
public void write(int b)
throws IOException
write in class OutputStreamIOException
public void write(byte[] b)
throws IOException
write in class OutputStreamIOException
public void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStreamIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||