Class GZipCompressInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- java.util.zip.DeflaterInputStream
-
- org.wso2.carbon.mediation.connector.compression.GZipCompressInputStream
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class GZipCompressInputStream extends DeflaterInputStream
This is the Gzip input stream wrapper, which will take normal input stream, compress it and provide gzip compressed input stream.
-
-
Field Summary
-
Fields inherited from class java.util.zip.DeflaterInputStream
buf, def
-
Fields inherited from class java.io.FilterInputStream
in
-
-
Constructor Summary
Constructors Constructor Description GZipCompressInputStream(InputStream in)
Constructor which wraps given input stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
read(byte[] b, int off, int len)
Overridden read method which will inject proper gzip header and gzip tail.-
Methods inherited from class java.util.zip.DeflaterInputStream
available, close, mark, markSupported, read, reset, skip
-
Methods inherited from class java.io.FilterInputStream
read
-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
Constructor Detail
-
GZipCompressInputStream
public GZipCompressInputStream(InputStream in)
Constructor which wraps given input stream.- Parameters:
in
-InputStream
object
-
-
Method Detail
-
read
public int read(byte[] b, int off, int len) throws IOException
Overridden read method which will inject proper gzip header and gzip tail.- Overrides:
read
in classDeflaterInputStream
- Parameters:
b
- buffer to read into.off
- offsetlen
- length- Returns:
- cnt number of bytes read.
- Throws:
IOException
-
-