Package org.jets3t.service.io
Class GZipDeflatingInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.jets3t.service.io.GZipDeflatingInputStream
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,InputStreamWrapper
public class GZipDeflatingInputStream extends InputStream implements InputStreamWrapper
Input stream that wraps another stream and deflates (compresses) the underlying stream's data on-the-fly. This class provides only a basic implementation of GZip functionality.- Author:
- James Murty
-
-
Constructor Summary
Constructors Constructor Description GZipDeflatingInputStream(InputStream inputStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
available()
void
close()
InputStream
getWrappedInputStream()
int
read()
int
read(byte[] b, int off, int len)
-
Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
-
-
-
-
Constructor Detail
-
GZipDeflatingInputStream
public GZipDeflatingInputStream(InputStream inputStream) throws IOException
- Throws:
IOException
-
-
Method Detail
-
read
public int read() throws IOException
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
public int read(byte[] b, int off, int len) throws IOException
- Overrides:
read
in classInputStream
- Throws:
IOException
-
available
public int available() throws IOException
- Overrides:
available
in classInputStream
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-
getWrappedInputStream
public InputStream getWrappedInputStream()
- Specified by:
getWrappedInputStream
in interfaceInputStreamWrapper
- Returns:
- the underlying input stream wrapped by this class.
-
-