| java.lang.Object java.io.InputStream java.io.FilterInputStream java.util.zip.InflaterInputStream
All known Subclasses: java.util.zip.GZIPInputStream, java.util.zip.ZipInputStream,
InflaterInputStream | public class InflaterInputStream extends FilterInputStream (Code) | | 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.
NOTE: java.util.zip.GZIPInputStream is found in J2ME CDC profiles
such as J2ME Foundation Profile.
See Also: Inflater version: 1.28, 02/02/00 author: David Connelly |
Field Summary | |
protected byte[] | buf Input buffer for decompression. | protected Inflater | inf Decompressor for this stream. | protected int | len Length of input buffer. | boolean | usesDefaultInflater |
Method Summary | |
public int | available() Returns 0 after EOF has reached, otherwise always return 1. | public void | close() Closes the input stream. | protected void | fill() Fills input buffer with more data to decompress. | public int | read() Reads a byte of uncompressed data. | public int | read(byte[] b, int off, int len) Reads uncompressed data into an array of bytes. | public long | skip(long n) Skips specified number of bytes of uncompressed data. |
buf | protected byte[] buf(Code) | | Input buffer for decompression.
|
len | protected int len(Code) | | Length of input buffer.
|
usesDefaultInflater | boolean usesDefaultInflater(Code) | | |
InflaterInputStream | public InflaterInputStream(InputStream in, Inflater inf, int size)(Code) | | Creates a new input stream with the specified decompressor and
buffer size.
Parameters: in - the input stream Parameters: inf - the decompressor ("inflater") Parameters: size - the input buffer size exception: IllegalArgumentException - if size is <= 0 |
InflaterInputStream | public InflaterInputStream(InputStream in, Inflater inf)(Code) | | Creates a new input stream with the specified decompressor and a
default buffer size.
Parameters: in - the input stream Parameters: inf - the decompressor ("inflater") |
InflaterInputStream | public InflaterInputStream(InputStream in)(Code) | | Creates a new input stream with a default decompressor and buffer size.
Parameters: in - the input stream |
available | public int available() throws IOException(Code) | | Returns 0 after EOF has 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.
1 before EOF and 0 after EOF. exception: IOException - if an I/O error occurs. |
fill | protected void fill() throws IOException(Code) | | Fills input buffer with more data to decompress.
exception: IOException - if an I/O error has occurred |
read | public int read() throws IOException(Code) | | Reads a byte of uncompressed data. This method will block until
enough input is available for decompression.
the byte read, or -1 if end of compressed input is reached exception: IOException - if an I/O error has occurred |
read | public int read(byte[] b, int off, int len) throws IOException(Code) | | Reads uncompressed data into an array of bytes. This method will
block until some input can be decompressed.
Parameters: b - the buffer into which the data is read Parameters: off - the start offset of the data Parameters: len - the maximum number of bytes read the actual number of bytes read, or -1 if the end of thecompressed input is reached or a preset dictionary is needed exception: ZipException - if a ZIP format error has occurred exception: IOException - if an I/O error has occurred |
skip | public long skip(long n) throws IOException(Code) | | Skips specified number of bytes of uncompressed data.
Parameters: n - the number of bytes to skip the actual number of bytes skipped. exception: IOException - if an I/O error has occurred exception: IllegalArgumentException - if n < 0 |
|
|