public class DeflaterInputStream extends FilterInputStream
DeflaterOutputStream,
InflaterOutputStream,
InflaterInputStream| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
buf
Input buffer for reading compressed data.
|
protected Deflater |
def
Compressor for this stream.
|
in| Constructor and Description |
|---|
DeflaterInputStream(InputStream in)
Creates a new input stream with a default compressor and buffer
size.
|
DeflaterInputStream(InputStream in,
Deflater defl)
Creates a new input stream with the specified compressor and a
default buffer size.
|
DeflaterInputStream(InputStream in,
Deflater defl,
int bufLen)
Creates a new input stream with the specified compressor and buffer
size.
|
| Modifier and Type | Method and Description |
|---|---|
int |
available()
Returns 0 after EOF has been reached, otherwise always return 1.
|
void |
close()
Closes this input stream and its underlying input stream, discarding
any pending uncompressed data.
|
void |
mark(int limit)
This operation is not supported.
|
boolean |
markSupported()
|
int |
read()
Reads a single byte of compressed data from the input stream.
|
int |
read(byte[] b,
int off,
int len)
Reads compressed data into a byte array.
|
void |
reset()
This operation is not supported.
|
long |
skip(long n)
Skips over and discards data from the input stream.
|
readprotected final Deflater def
protected final byte[] buf
public DeflaterInputStream(InputStream in)
NullPointerException - if in is nullin - input stream to read the uncompressed data topublic DeflaterInputStream(InputStream in, Deflater defl)
NullPointerException - if in or defl is nullin - input stream to read the uncompressed data todefl - compressor ("deflater") for this streampublic DeflaterInputStream(InputStream in, Deflater defl, int bufLen)
IllegalArgumentException - if bufLen <= 0NullPointerException - if in or defl is nullin - input stream to read the uncompressed data todefl - compressor ("deflater") for this streambufLen - compression buffer sizepublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FilterInputStreamIOException - if an I/O error occursFilterInputStream.inpublic int read()
throws IOException
read in class FilterInputStreamIOException - if an I/O error occurs or if this stream is
already closedFilterInputStream.inpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class FilterInputStreamIndexOutOfBoundsException - if len > b.length - offIOException - if an I/O error occurs or if this input stream is
already closedb - buffer into which the data is readoff - starting offset of the data within blen - maximum number of compressed bytes to read into bFilterInputStream.inpublic long skip(long n)
throws IOException
n is given as a long,
the maximum number of bytes which can be skipped is
Integer.MAX_VALUE.skip in class FilterInputStreamIOException - if an I/O error occurs or if this stream is
already closedn - number of bytes to be skippedpublic int available()
throws IOException
Programs should not count on this method to return the actual number of bytes that could be read without blocking
available in class FilterInputStreamIOException - if an I/O error occurs or if this stream is
already closedpublic boolean markSupported()
markSupported in class FilterInputStreamFilterInputStream.in,
InputStream.mark(int),
InputStream.reset()public void mark(int limit)
mark in class FilterInputStreamlimit - maximum bytes that can be read before invalidating the position markerFilterInputStream.in,
FilterInputStream.reset()public void reset()
throws IOException
reset in class FilterInputStreamIOException - always thrownFilterInputStream.in,
FilterInputStream.mark(int)aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2019 aicas GmbH. All Rights Reserved.