Unless otherwise noted, passing a null
argument to a constructor
or method in this class will cause a NullPointerException
to be
thrown.
Inflater
Modifier and Type | Field and Description |
---|---|
protected byte[] | buf
Input buffer for decompression. |
private boolean | |
protected Inflater | inf
Decompressor for this stream. |
protected int | len
The total number of bytes read into the input buffer. |
private boolean | |
private final byte[] | |
pack-priv boolean |
Access | Constructor and Description |
---|---|
public | InflaterInputStream(InputStream
the input stream in, Inflater the decompressor ("inflater") inf, int the input buffer size size)Creates a new input stream with the specified decompressor and buffer size. |
public | InflaterInputStream(InputStream
the input stream in, Inflater the decompressor ("inflater") inf)Creates a new input stream with the specified decompressor and a default buffer size. |
public | InflaterInputStream(InputStream
the input stream in)Creates a new input stream with a default decompressor and buffer size. |
Modifier and Type | Method and Description |
---|---|
public int | Returns: 1 before EOF and 0 after EOF.Overrides java. Returns 0 after EOF has been reached, otherwise always return 1. |
public void | close()
Overrides java. Implements java. Closes this input stream and releases any system resources associated with the stream. |
private void | |
protected void | |
public void | mark(int
the maximum limit of bytes that can be read before
the mark position becomes invalid. readlimit)Overrides java. Marks the current position in this input stream. |
public boolean | Returns: aboolean indicating if this stream type supports
the mark and reset methods.Overrides java. Tests if this input stream supports the |
public int | Returns: the byte read, or -1 if end of compressed input is reachedOverrides java. Reads a byte of uncompressed data. |
public int | Returns: the actual number of bytes inflated, or -1 if the end of the compressed input is reached or a preset dictionary is neededthe buffer into which the data is read b, int the start offset in the destination array off, int b the maximum number of bytes read len)Overrides java. Reads uncompressed data into an array of bytes, returning the number of inflated bytes. |
public void | reset()
Overrides java. Repositions this stream to the position at the time the
|
public long | Returns: the actual number of bytes skipped, which might be zerothe number of bytes to skip. If n)n is zero then no bytes are skipped.Overrides java. Skips specified number of bytes of uncompressed data. |
buf | back to summary |
---|---|
protected byte[] buf Input buffer for decompression. |
closed | back to summary |
---|---|
private boolean closed |
inf | back to summary |
---|---|
protected Inflater inf Decompressor for this stream. |
len | back to summary |
---|---|
protected int len The total number of bytes read into the input buffer. |
reachEOF | back to summary |
---|---|
private boolean reachEOF |
singleByteBuf | back to summary |
---|---|
private final byte[] singleByteBuf |
usesDefaultInflater | back to summary |
---|---|
pack-priv boolean usesDefaultInflater |
InflaterInputStream | back to summary |
---|---|
public InflaterInputStream(InputStream in, Inflater inf, int size) Creates a new input stream with the specified decompressor and buffer size.
|
InflaterInputStream | back to summary |
---|---|
public InflaterInputStream(InputStream in, Inflater inf) Creates a new input stream with the specified decompressor and a default buffer size.
|
InflaterInputStream | back to summary |
---|---|
public InflaterInputStream(InputStream in) Creates a new input stream with a default decompressor and buffer size.
|
available | back to summary |
---|---|
public int available() throws IOException Overrides java. 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.
|
close | back to summary |
---|---|
public void close() throws IOException Overrides java. Implements java. Closes this input stream and releases any system resources associated with the stream.
|
ensureOpen | back to summary |
---|---|
private void ensureOpen() throws IOException Check to make sure that this stream has not been closed |
fill | back to summary |
---|---|
protected void fill() throws IOException Fills input buffer with more data to decompress. Implementation Specification This method will read up to
|
mark | back to summary |
---|---|
public void mark(int readlimit) Overrides java. Marks the current position in this input stream. Implementation Specification The
|
markSupported | back to summary |
---|---|
public boolean markSupported() Overrides java. Tests if this input stream supports the
|
read | back to summary |
---|---|
public int read() throws IOException Overrides java. Reads a byte of uncompressed data. This method will block until enough input is available for decompression.
|
read | back to summary |
---|---|
public int read(byte[] b, int off, int len) throws IOException Overrides java. Reads uncompressed data into an array of bytes, returning the number of inflated
bytes. If
If this method returns a nonzero integer n then
|
reset | back to summary |
---|---|
public void reset() throws IOException Overrides java. Repositions this stream to the position at the time the
Implementation Specification The method
|
skip | back to summary |
---|---|
public long skip(long n) throws IOException Overrides java. Skips specified number of bytes of uncompressed data. This method may block until the specified number of bytes are skipped or end of stream is reached. Implementation Note This method skips at most
|