| |
|
| java.lang.Object java.io.OutputStream java.io.FilterOutputStream java.util.zip.DeflaterOutputStream
All known Subclasses: java.util.zip.ZipOutputStream, java.util.zip.GZIPOutputStream,
DeflaterOutputStream | public class DeflaterOutputStream extends FilterOutputStream (Code) | | This class implements an output stream filter for compressing data in
the "deflate" compression format. It is also used as the basis for other
types of compression filters, such as GZIPOutputStream.
See Also: Deflater version: 1.42, 05/05/07 author: David Connelly |
Method Summary | |
public void | close() Writes remaining compressed data to the output stream and closes the
underlying stream. | protected void | deflate() Writes next block of compressed data to the output stream. | public void | finish() Finishes writing compressed data to the output stream without closing
the underlying stream. | public void | write(int b) Writes a byte to the compressed output stream. | public void | write(byte[] b, int off, int len) Writes an array of bytes to the compressed output stream. |
buf | protected byte[] buf(Code) | | Output buffer for writing compressed data.
|
usesDefaultDeflater | boolean usesDefaultDeflater(Code) | | |
DeflaterOutputStream | public DeflaterOutputStream(OutputStream out, Deflater def, int size)(Code) | | Creates a new output stream with the specified compressor and
buffer size.
Parameters: out - the output stream Parameters: def - the compressor ("deflater") Parameters: size - the output buffer size exception: IllegalArgumentException - if size is <= 0 |
DeflaterOutputStream | public DeflaterOutputStream(OutputStream out, Deflater def)(Code) | | Creates a new output stream with the specified compressor and
a default buffer size.
Parameters: out - the output stream Parameters: def - the compressor ("deflater") |
DeflaterOutputStream | public DeflaterOutputStream(OutputStream out)(Code) | | Creates a new output stream with a default compressor and buffer size.
Parameters: out - the output stream |
close | public void close() throws IOException(Code) | | Writes remaining compressed data to the output stream and closes the
underlying stream.
exception: IOException - if an I/O error has occurred |
deflate | protected void deflate() throws IOException(Code) | | Writes next block of compressed data to the output stream.
throws: IOException - if an I/O error has occurred |
finish | public void finish() throws IOException(Code) | | Finishes writing compressed data to the output stream without closing
the underlying stream. Use this method when applying multiple filters
in succession to the same output stream.
exception: IOException - if an I/O error has occurred |
write | public void write(int b) throws IOException(Code) | | Writes a byte to the compressed output stream. This method will
block until the byte can be written.
Parameters: b - the byte to be written exception: IOException - if an I/O error has occurred |
write | public void write(byte[] b, int off, int len) throws IOException(Code) | | Writes an array of bytes to the compressed output stream. This
method will block until all the bytes are written.
Parameters: b - the data to be written Parameters: off - the start offset of the data Parameters: len - the length of the data exception: IOException - if an I/O error has occurred |
|
|
|