java.lang.Object | |||
↳ | java.io.InputStream | ||
↳ | java.io.FilterInputStream | ||
↳ | java.util.zip.DeflaterInputStream |
Implements an input stream filter for compressing data in the "deflate" compression format.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
buf | Input buffer for reading compressed data. | ||||||||||
def | Compressor for this stream. |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.io.FilterInputStream
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new input stream with a default compressor and buffer
size.
| |||||||||||
Creates a new input stream with the specified compressor and a
default buffer size.
| |||||||||||
Creates a new input stream with the specified compressor and buffer
size.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns 0 after EOF has been reached, otherwise always return 1.
| |||||||||||
Closes this input stream and its underlying input stream, discarding
any pending uncompressed data.
| |||||||||||
This operation is not supported.
| |||||||||||
Reads a single byte of compressed data from the input stream.
| |||||||||||
Reads compressed data into a byte array.
| |||||||||||
This operation is not supported.
| |||||||||||
Skips over and discards data from the input stream.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.io.FilterInputStream
| |||||||||||
From class
java.io.InputStream
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
java.io.Closeable
|
Input buffer for reading compressed data.
Creates a new input stream with a default compressor and buffer size.
in | input stream to read the uncompressed data to |
---|
NullPointerException | if in is null
|
---|
Creates a new input stream with the specified compressor and a default buffer size.
in | input stream to read the uncompressed data to |
---|---|
defl | compressor ("deflater") for this stream |
NullPointerException | if in or defl is null
|
---|
Creates a new input stream with the specified compressor and buffer size.
in | input stream to read the uncompressed data to |
---|---|
defl | compressor ("deflater") for this stream |
bufLen | compression buffer size |
IllegalArgumentException | if bufLen is <= 0 |
---|---|
NullPointerException | if in or defl is null
|
Returns 0 after EOF has been reached, otherwise always return 1.
Programs should not count on this method to return the actual number of bytes that could be read without blocking
IOException | if an I/O error occurs or if this stream is already closed |
---|
Closes this input stream and its underlying input stream, discarding any pending uncompressed data.
IOException | if an I/O error occurs |
---|
This operation is not supported.
limit | maximum bytes that can be read before invalidating the position marker |
---|
Reads a single byte of compressed data from the input stream. This method will block until some input can be read and compressed.
IOException | if an I/O error occurs or if this stream is already closed |
---|
Reads compressed data into a byte array. This method will block until some input can be read and compressed.
b | buffer into which the data is read |
---|---|
off | starting offset of the data within b |
len | maximum number of compressed bytes to read into b |
IndexOutOfBoundsException | if len > b.length -
off |
---|---|
IOException | if an I/O error occurs or if this input stream is already closed |
Skips over and discards data from the input stream.
This method may block until the specified number of bytes are read and
skipped. Note: While n
is given as a long
,
the maximum number of bytes which can be skipped is
Integer.MAX_VALUE
.
n | number of bytes to be skipped |
---|
IOException | if an I/O error occurs or if this stream is already closed |
---|