| java.lang.Object | |||
| ↳ | java.io.InputStream | ||
| ↳ | java.io.FilterInputStream | ||
| ↳ | java.util.zip.InflaterInputStream | ||
|  Known Direct Subclasses | 
|  Known Indirect Subclasses | 
This class provides an implementation of FilterInputStream that decompresses data that was compressed using the DEFLATE algorithm (see specification). Basically it wraps the Inflater class and takes care of the buffering.
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  | buf | The input buffer used for decompression. | |||||||||
|  | inf | The inflater used for this stream. | |||||||||
|  | len | The length of the buffer. | |||||||||
| [Expand] 
           Inherited Fields
           | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  From class java.io.FilterInputStream | |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  | 
           This is the most basic constructor.
           | ||||||||||
|  | 
           This constructor lets you pass a specifically initialized Inflater, for example one that expects no ZLIB header.
           | ||||||||||
|  | 
           This constructor lets you specify both the 
            Inflateras well as the internal buffer size to be used. | ||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  | 
           Returns 0 when when this stream has exhausted its input; and 1 otherwise.
           | ||||||||||
|  | 
           Closes the input stream.
           | ||||||||||
|  | 
           Marks the current position in the stream.
           | ||||||||||
|  | 
           Returns whether the receiver implements 
            marksemantics. | ||||||||||
|  | 
           Reads a single byte of decompressed data.
           | ||||||||||
|  | 
           Reads up to 
            byteCountbytes of decompressed data and stores it inbufferstarting atoffset. | ||||||||||
|  | 
           Reset the position of the stream to the last marked position.
           | ||||||||||
|  | 
           Skips up to 
            byteCountbytes of uncompressed data. | ||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  | 
           Fills the input buffer with data to be decompressed.
           | ||||||||||
| [Expand] 
           Inherited Methods
           | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  From class java.io.FilterInputStream | |||||||||||
|  From class java.io.InputStream | |||||||||||
|  From class java.lang.Object | |||||||||||
|  From interface java.io.Closeable | |||||||||||
This is the most basic constructor. You only need to pass the InputStream from which the compressed data is to be read from. Default settings for the Inflater and internal buffer are be used. In particular the Inflater expects a ZLIB header from the input stream.
| is | the InputStreamto read data from. | 
|---|
This constructor lets you pass a specifically initialized Inflater, for example one that expects no ZLIB header.
| is | the InputStreamto read data from. | 
|---|---|
| inflater | the specific Inflaterfor decompressing data. | 
This constructor lets you specify both the Inflater as well as the internal buffer size to be used.
| is | the InputStreamto read data from. | 
|---|---|
| inflater | the specific Inflaterfor decompressing data. | 
| bsize | the size to be used for 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 input stream.
| IOException | If an error occurs closing the input stream. | 
|---|
Marks the current position in the stream. This implementation overrides the super type implementation to do nothing at all.
| readlimit | of no use. | 
|---|
Returns whether the receiver implements mark semantics. This type does not support mark(), so always responds false.
Reads a single byte of decompressed data.
| IOException | if an error occurs reading the byte. | 
|---|
Reads up to byteCount bytes of decompressed data and stores it in buffer starting at offset.
| 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 | 
|---|
Reset the position of the stream to the last marked position. This implementation overrides the supertype implementation and always throws an IOException when called.
| IOException | if the method is called | 
|---|
Skips up to byteCount bytes of uncompressed data.
| byteCount | the number of bytes to skip. | 
|---|
| IllegalArgumentException | if byteCount < 0. | 
|---|---|
| IOException | if an error occurs skipping. | 
Fills the input buffer with data to be decompressed.
| IOException | if an IOExceptionoccurs. | 
|---|