| java.lang.Object | |||
| ↳ | java.io.InputStream | ||
| ↳ | java.io.FilterInputStream | ||
| ↳ | java.util.zip.DeflaterInputStream | ||
An InputStream filter to compress data. Callers read compressed data in the "deflate" format from the uncompressed underlying stream.
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  | buf | ||||||||||
|  | def | ||||||||||
| [Expand] 
           Inherited Fields
           | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  From class java.io.FilterInputStream | |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  | 
           Constructs a 
            DeflaterInputStreamwith a newDeflaterand an implementation-defined default internal buffer size. | ||||||||||
|  | 
           Constructs a 
            DeflaterInputStreamwith the givenDeflaterand an implementation-defined default internal buffer size. | ||||||||||
|  | 
           Constructs a 
            DeflaterInputStreamwith the givenDeflaterand given internal buffer size. | ||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  | 
           Returns 0 when when this stream has exhausted its input; and 1 otherwise.
           | ||||||||||
|  | 
           Closes the underlying input stream and discards any remaining uncompressed data.
           | ||||||||||
|  | 
           This operation is not supported and does nothing.
           | ||||||||||
|  | 
           Returns false because 
            DeflaterInputStreamdoes not supportmark/reset. | ||||||||||
|  | 
           Reads a byte from the compressed input stream.
           | ||||||||||
|  | 
           Reads compressed data into a byte buffer.
           | ||||||||||
|  | 
           This operation is not supported and throws 
            IOException. | ||||||||||
|  | 
           Skips 
            byteCountbytes in this stream.Note: if  | ||||||||||
| [Expand] 
           Inherited Methods
           | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  From class java.io.FilterInputStream | |||||||||||
|  From class java.io.InputStream | |||||||||||
|  From class java.lang.Object | |||||||||||
|  From interface java.io.Closeable | |||||||||||
Constructs a DeflaterInputStream with a new Deflater and an implementation-defined default internal buffer size. in is a source of uncompressed data, and this stream will be a source of compressed data.
| in | the source InputStream | 
|---|
Constructs a DeflaterInputStream with the given Deflater and an implementation-defined default internal buffer size. in is a source of uncompressed data, and this stream will be a source of compressed data.
| in | the source InputStream | 
|---|---|
| deflater | the Deflaterto be used for compression | 
Constructs a DeflaterInputStream with the given Deflater and given internal buffer size. in is a source of uncompressed data, and this stream will be a source of compressed data.
| in | the source InputStream | 
|---|---|
| deflater | the Deflaterto be used for compression | 
| bufferSize | the length in bytes of the internal buffer | 
Returns 0 when when this stream has exhausted its input; and 1 otherwise. A result of 1 does not guarantee that further bytes can be returned, with or without blocking.
Although consistent with the RI, this behavior is inconsistent with available(), and violates the Liskov Substitution Principle. This method should not be used.
| IOException | if this stream is closed or an error occurs | 
|---|
Closes the underlying input stream and discards any remaining uncompressed data.
| IOException | 
|---|
This operation is not supported and does nothing.
| limit | the number of bytes that can be read from this stream before the mark is invalidated. | 
|---|
Returns false because DeflaterInputStream does not support mark/reset. 
true if mark() and reset() are supported, false otherwise.Reads a byte from the compressed input stream. The result will be a byte of compressed data corresponding to an uncompressed byte or bytes read from the underlying stream.
| IOException | 
|---|
Reads compressed data into a byte buffer. The result will be bytes of compressed data corresponding to an uncompressed byte or bytes read from the underlying stream.
| buffer | the byte array in which to store the bytes read. | 
|---|---|
| offset | the initial position in bufferto store the bytes read from this stream. | 
| byteCount | the maximum number of bytes to store in buffer. | 
| IOException | 
|---|
This operation is not supported and throws IOException. 
| IOException | 
|---|
Skips byteCount bytes in this stream. Subsequent calls to read will not return these bytes unless reset is used. This implementation skips byteCount bytes in the filtered stream. 
Note: if n > Integer.MAX_VALUE, this stream will only attempt to skip Integer.MAX_VALUE bytes. 
| byteCount | the number of bytes to skip. | 
|---|
| IOException | 
|---|