| |
|
| 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.
See Also: Inflater version: 1.46, 05/05/07 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 been reached, otherwise always return 1. | public void | close() Closes this input stream and releases any system resources associated
with the stream. | protected void | fill() Fills input buffer with more data to decompress. | public synchronized void | mark(int readlimit) Marks the current position in this input stream. | public boolean | markSupported() Tests if this input stream supports the mark and
reset methods. | 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 synchronized void | reset() Repositions this stream to the position at the time the
mark method was last called on this input stream. | 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 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.
1 before EOF and 0 after EOF. exception: IOException - if an I/O error occurs. |
close | public void close() throws IOException(Code) | | Closes this input stream and releases any system resources associated
with the stream.
exception: IOException - if an I/O error has occurred |
fill | protected void fill() throws IOException(Code) | | Fills input buffer with more data to decompress.
exception: IOException - if an I/O error has occurred |
mark | public synchronized void mark(int readlimit)(Code) | | Marks the current position in this input stream.
The mark method of InflaterInputStream
does nothing.
Parameters: readlimit - the maximum limit of bytes that can be read beforethe mark position becomes invalid. See Also: java.io.InputStream.reset |
markSupported | public boolean markSupported()(Code) | | Tests if this input stream supports the mark and
reset methods. The markSupported
method of InflaterInputStream returns
false .
a boolean indicating if this stream type supportsthe mark and reset methods. See Also: java.io.InputStream.mark(int) See Also: java.io.InputStream.reset |
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. If len is not
zero, the method will block until some input can be decompressed; otherwise,
no bytes are read and 0 is returned.
Parameters: b - the buffer into which the data is read Parameters: off - the start offset in the destination array b 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: NullPointerException - If b is null . exception: IndexOutOfBoundsException - If off is negative, len is negative, or len is greater than b.length - off 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 |
|
|
|