|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
java.io.FilterOutputStream
java.util.zip.DeflaterOutputStream
java.util.zip.GZIPOutputStream
public class GZIPOutputStream
This filter stream is used to compress a stream into a "GZIP" stream. The "GZIP" format is described in RFC 1952.
Field Summary | |
---|---|
protected CRC32 |
crc
CRC-32 value for uncompressed data |
Fields inherited from class java.util.zip.DeflaterOutputStream |
---|
buf, def |
Fields inherited from class java.io.FilterOutputStream |
---|
out |
Constructor Summary | |
---|---|
GZIPOutputStream(OutputStream out)
Creates a GZIPOutputStream with the default buffer size |
|
GZIPOutputStream(OutputStream out,
int size)
Creates a GZIPOutputStream with the specified buffer size |
Method Summary | |
---|---|
void |
close()
Writes remaining compressed output data to the output stream and closes it. |
void |
finish()
Finishes the stream by calling finish() on the deflater. |
void |
write(byte[] buf,
int off,
int len)
Writes a len bytes from an array to the compressed stream. |
Methods inherited from class java.util.zip.DeflaterOutputStream |
---|
deflate, flush, write |
Methods inherited from class java.io.FilterOutputStream |
---|
write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected CRC32 crc
Constructor Detail |
---|
public GZIPOutputStream(OutputStream out) throws IOException
out
- The stream to read data (to be compressed) from
IOException
public GZIPOutputStream(OutputStream out, int size) throws IOException
out
- The stream to read compressed data fromsize
- Size of the buffer to use
IOException
Method Detail |
---|
public void write(byte[] buf, int off, int len) throws IOException
DeflaterOutputStream
write
in class DeflaterOutputStream
buf
- the byte array.off
- the offset into the byte array where to start.len
- the number of bytes to write.
IOException
- If an error occurspublic void close() throws IOException
close
in interface Closeable
close
in class DeflaterOutputStream
IOException
- If an error occurspublic void finish() throws IOException
DeflaterOutputStream
finish
in class DeflaterOutputStream
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |