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.IOExceptionpublic GZInputStream(java.io.InputStream in,
int size)
throws java.io.IOException
java.io.IOExceptionpublic int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOExceptionpublic boolean markSupported()
markSupported in class java.io.InputStreampublic int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] b)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic long skip(long n)
throws java.io.IOException
skip in class java.io.InputStreamn - number of bytes to skipjava.io.IOExceptionpublic boolean isGzip()
public void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStream