| |
|
| java.lang.Object java.io.InputStream java.io.FilterInputStream java.util.zip.DeflaterInputStream
Field Summary | |
final protected byte[] | buf Input buffer for reading compressed data. | final protected Deflater | def Compressor for this stream. |
Method Summary | |
public int | available() Returns 0 after EOF has been reached, otherwise always return 1. | public void | close() Closes this input stream and its underlying input stream, discarding
any pending uncompressed data. | public void | mark(int limit) This operation is not supported. | public boolean | markSupported() Always returns
false because this input stream does not support
the
DeflaterInputStream.mark mark() and
DeflaterInputStream.reset reset() methods. | public int | read() Reads a single byte of compressed data from the input stream. | public int | read(byte[] b, int off, int len) Reads compressed data into a byte array. | public void | reset() This operation is not supported. | public long | skip(long n) Skips over and discards data from the input stream.
This method may block until the specified number of bytes are read and
skipped. |
buf | final protected byte[] buf(Code) | | Input buffer for reading compressed data.
|
DeflaterInputStream | public DeflaterInputStream(InputStream in)(Code) | | Creates a new input stream with a default compressor and buffer
size.
Parameters: in - input stream to read the uncompressed data to throws: NullPointerException - if in is null |
DeflaterInputStream | public DeflaterInputStream(InputStream in, Deflater defl)(Code) | | Creates a new input stream with the specified compressor and a
default buffer size.
Parameters: in - input stream to read the uncompressed data to Parameters: defl - compressor ("deflater") for this stream throws: NullPointerException - if in or defl is null |
DeflaterInputStream | public DeflaterInputStream(InputStream in, Deflater defl, int bufLen)(Code) | | Creates a new input stream with the specified compressor and buffer
size.
Parameters: in - input stream to read the uncompressed data to Parameters: defl - compressor ("deflater") for this stream Parameters: bufLen - compression buffer size throws: IllegalArgumentException - if bufLen is <= 0 throws: NullPointerException - if in or defl is null |
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
zero after the end of the underlying input stream has beenreached, otherwise always returns 1 throws: IOException - if an I/O error occurs or if this stream isalready closed |
close | public void close() throws IOException(Code) | | Closes this input stream and its underlying input stream, discarding
any pending uncompressed data.
throws: IOException - if an I/O error occurs |
mark | public void mark(int limit)(Code) | | This operation is not supported.
Parameters: limit - maximum bytes that can be read before invalidating the position marker |
read | public int read() throws IOException(Code) | | Reads a single byte of compressed data from the input stream.
This method will block until some input can be read and compressed.
a single byte of compressed data, or -1 if the end of theuncompressed input stream is reached throws: IOException - if an I/O error occurs or if this stream isalready closed |
read | public int read(byte[] b, int off, int len) throws IOException(Code) | | Reads compressed data into a byte array.
This method will block until some input can be read and compressed.
Parameters: b - buffer into which the data is read Parameters: off - starting offset of the data within b Parameters: len - maximum number of compressed bytes to read into b the actual number of bytes read, or -1 if the end of theuncompressed input stream is reached throws: IndexOutOfBoundsException - if len > b.length - off throws: IOException - if an I/O error occurs or if this input stream isalready closed |
skip | public long skip(long n) throws IOException(Code) | | Skips over and discards data from the input stream.
This method may block until the specified number of bytes are read and
skipped. Note: While
n is given as a
long ,
the maximum number of bytes which can be skipped is
Integer.MAX_VALUE .
Parameters: n - number of bytes to be skipped the actual number of bytes skipped throws: IOException - if an I/O error occurs or if this stream isalready closed |
|
|
|