public class GZInputStream
extends java.io.InputStream
Constructor and Description |
---|
GZInputStream(java.io.InputStream in) |
GZInputStream(java.io.InputStream in,
int size) |
Modifier and Type | Method and Description |
---|---|
int |
available()
Returns 0 if gzip EOF has been reached, 1 otherwise
|
void |
close() |
boolean |
isGzip()
Returns true if stream is in gzip format.
|
boolean |
markSupported()
mark() and reset() are not supported by this class.
|
int |
read()
Returns the byte read, -1 if EOF
|
int |
read(byte[] b)
Reads from the compressed stream and
stores the resulting uncompressed data into the byte array.
|
int |
read(byte[] b,
int off,
int len)
Reads from the compressed stream and
stores the resulting uncompressed data into the byte array.
|
long |
skip(long n)
Skips over and discards n bytes.
|
public GZInputStream(java.io.InputStream in) throws java.io.IOException
java.io.IOException
public GZInputStream(java.io.InputStream in, int size) throws java.io.IOException
java.io.IOException
public int available() throws java.io.IOException
available
in class java.io.InputStream
java.io.IOException
public boolean markSupported()
markSupported
in class java.io.InputStream
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] b) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public long skip(long n) throws java.io.IOException
skip
in class java.io.InputStream
n
- number of bytes to skipjava.io.IOException
public boolean isGzip()
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.InputStream