| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public class InflaterOutputStream extends FilterOutputStream
Implements an output stream filter for uncompressing data stored in the "deflate" compression format.
Field Summary | |
---|---|
protected byte[] |
buf
Output buffer for writing uncompressed data. |
protected Inflater |
inf
Decompressor for this stream. |
Fields inherited from class java.io.FilterOutputStream |
---|
out |
Constructor Summary | |
---|---|
Creates a new output stream with a default decompressor and buffer size. |
|
InflaterOutputStream(OutputStream out, Inflater infl) Creates a new output stream with the specified decompressor and a default buffer size. |
|
InflaterOutputStream(OutputStream out, Inflater infl, int bufLen) Creates a new output stream with the specified decompressor and buffer size. |
Method Summary | |
---|---|
void |
close() Writes any remaining uncompressed data to the output stream and closes the underlying output stream. |
void |
finish() Finishes writing uncompressed data to the output stream without closing the underlying stream. |
void |
flush() Flushes this output stream, forcing any pending buffered output bytes to be written. |
void |
write(byte[] b, int off, int len) Writes an array of bytes to the uncompressed output stream. |
void |
write(int b) Writes a byte to the uncompressed output stream. |
Methods inherited from class java.io.FilterOutputStream |
---|
close, flush, write, write, write |
Methods inherited from class java.io.OutputStream |
---|
close, flush, write, write, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final byte[] buf
protected final Inflater inf
Constructor Detail |
---|
public InflaterOutputStream(OutputStream out)
out
- output stream to write the uncompressed data topublic InflaterOutputStream(OutputStream out, Inflater infl)
out
- output stream to write the uncompressed data toinfl
- decompressor ("inflater") for this streampublic InflaterOutputStream(OutputStream out, Inflater infl, int bufLen)
out
- output stream to write the uncompressed data toinfl
- decompressor ("inflater") for this streambufLen
- decompression buffer sizeMethod Detail |
---|
public void close() throws IOException
close
in class FilterOutputStream
IOException
- if an I/O error occurspublic void finish() throws IOException
IOException
- if an I/O error occurs or this stream is already
closedpublic void flush() throws IOException
flush
in class FilterOutputStream
IOException
- if an I/O error occurs or this stream is already
closedpublic void write(byte[] b, int off, int len) throws IOException
write
in class FilterOutputStream
b
- buffer containing compressed data to decompress and write to
the output streamoff
- starting offset of the compressed data within {@code b}len
- number of bytes to decompress from {@code b}IOException
- if an I/O error occurs or this stream is already
closedpublic void write(int b) throws IOException
write
in class FilterOutputStream
b
- a single byte of compressed data to decompress and write to
the output streamIOException
- if an I/O error occurs or this stream is already
closed
| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |