java.lang.Object | |||
↳ | java.io.InputStream | ||
↳ | java.io.FilterInputStream | ||
↳ | java.util.zip.InflaterInputStream |
Known Direct Subclasses |
Known Indirect Subclasses |
This class implements a stream filter for uncompressing data in the "deflate" compression format. It is also used as the basis for other decompression filters, such as GZIPInputStream.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
buf | Input buffer for decompression. | ||||||||||
inf | Decompressor for this stream. | ||||||||||
len | Length of input buffer. |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.io.FilterInputStream
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new input stream with the specified decompressor and
buffer size.
| |||||||||||
Creates a new input stream with the specified decompressor and a
default buffer size.
| |||||||||||
Creates a new input stream with a default decompressor and buffer size.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns 0 after EOF has been reached, otherwise always return 1.
| |||||||||||
Closes this input stream and releases any system resources associated
with the stream.
| |||||||||||
Marks the current position in this input stream.
| |||||||||||
Tests if this input stream supports the
mark and
reset methods. | |||||||||||
Reads a byte of uncompressed data.
| |||||||||||
Reads uncompressed data into an array of bytes.
| |||||||||||
Repositions this stream to the position at the time the
mark method was last called on this input stream. | |||||||||||
Skips specified number of bytes of uncompressed data.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Fills input buffer with more data to decompress.
|
[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 decompression.
Length of input buffer.
Creates a new input stream with the specified decompressor and buffer size.
in | the input stream |
---|---|
inf | the decompressor ("inflater") |
size | the input buffer size |
IllegalArgumentException | if size is <= 0 |
---|
Creates a new input stream with the specified decompressor and a default buffer size.
in | the input stream |
---|---|
inf | the decompressor ("inflater") |
Creates a new input stream with a default decompressor and buffer size.
in | the input stream |
---|
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. |
---|
Closes this input stream and releases any system resources associated with the stream.
IOException | if an I/O error has occurred |
---|
Marks the current position in this input stream.
The mark
method of InflaterInputStream
does nothing.
readlimit | the maximum limit of bytes that can be read before the mark position becomes invalid. |
---|
Reads a byte of uncompressed data. This method will block until enough input is available for decompression.
IOException | if an I/O error has occurred |
---|
Reads uncompressed data into an array of bytes. If len
is not
zero, the method will block until some input can be decompressed; otherwise,
no bytes are read and 0
is returned.
b | the buffer into which the data is read |
---|---|
off | the start offset in the destination array b |
len | the maximum number of bytes read |
NullPointerException | If b is null . |
---|---|
IndexOutOfBoundsException | If off is negative,
len is negative, or len is greater than
b.length - off |
ZipException | if a ZIP format error has occurred |
IOException | if an I/O error has occurred |
Repositions this stream to the position at the time the
mark
method was last called on this input stream.
The method reset
for class
InflaterInputStream
does nothing except throw an
IOException
.
IOException | if this method is invoked. |
---|
Skips specified number of bytes of uncompressed data.
n | the number of bytes to skip |
---|
IOException | if an I/O error has occurred |
---|---|
IllegalArgumentException | if n < 0 |
Fills input buffer with more data to decompress.
IOException | if an I/O error has occurred |
---|