public class DeflateInputStream extends InputStream
Constructor and Description |
---|
DeflateInputStream(InputStream wrapped) |
Modifier and Type | Method and Description |
---|---|
int |
available()
Get available.
|
void |
close()
Close.
|
void |
mark(int readLimit)
Mark.
|
boolean |
markSupported()
Check if mark is supported.
|
int |
read()
Read a byte.
|
int |
read(byte[] b)
Read lots of bytes.
|
int |
read(byte[] b,
int off,
int len)
Read lots of specific bytes.
|
void |
reset()
Reset.
|
long |
skip(long n)
Skip
|
public DeflateInputStream(InputStream wrapped) throws IOException
IOException
public int available() throws IOException
available
in class InputStream
0
when it reaches the end of the input stream.IOException
- if an I/O error occurs.public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
- if an I/O error occurs.public void mark(int readLimit)
mark
in class InputStream
readLimit
- the maximum limit of bytes that can be read before the mark position becomes invalid.InputStream.reset()
public boolean markSupported()
markSupported
in class InputStream
true
if this stream instance supports the mark and reset methods;
false
otherwise.InputStream.mark(int)
,
InputStream.reset()
public int read() throws IOException
read
in class InputStream
-1
if the end of the stream is reached.IOException
- if an I/O error occurs.public int read(byte[] b) throws IOException
read
in class InputStream
b
- the buffer into which the data is read.-1
if there is no more
data because the end of the stream has been reached.IOException
- If the first byte cannot be read for any reason other than the end of the file, if the
input stream has been closed, or if some other I/O error occurs.InputStream.read(byte[], int, int)
public int read(byte[] b, int off, int len) throws IOException
read
in class InputStream
b
- the buffer into which the data is read.off
- the start offset in array b
at which the data is written.len
- the maximum number of bytes to read.-1
if there is no more
data because the end of the stream has been reached.IOException
- If the first byte cannot be read for any reason other than end of file, or if the
input stream has been closed, or if some other I/O error occurs.InputStream.read()
public void reset() throws IOException
reset
in class InputStream
IOException
- if this stream has not been marked or if the mark has been invalidated.InputStream.mark(int)
,
IOException
public long skip(long n) throws IOException
skip
in class InputStream
n
- the number of bytes to be skipped.IOException
- if the stream does not support seek, or if some other I/O error occurs.