Package org.jets3t.service.io
Class GZipInflatingOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- org.jets3t.service.io.GZipInflatingOutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
,OutputStreamWrapper
public class GZipInflatingOutputStream extends OutputStream implements OutputStreamWrapper
Output stream that wraps another stream and inflates (de-compresses) the underlying stream's data on-the-fly. This class provides only a basic implementation of GZip functionality.- Author:
- James Murty
-
-
Field Summary
Fields Modifier and Type Field Description static int
GZIP_MAGIC
-
Constructor Summary
Constructors Constructor Description GZipInflatingOutputStream(OutputStream outputStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
flush()
OutputStream
getWrappedOutputStream()
void
write(byte[] b, int off, int len)
void
write(int value)
-
Methods inherited from class java.io.OutputStream
nullOutputStream, write
-
-
-
-
Field Detail
-
GZIP_MAGIC
public static final int GZIP_MAGIC
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GZipInflatingOutputStream
public GZipInflatingOutputStream(OutputStream outputStream) throws IOException
- Throws:
IOException
-
-
Method Detail
-
write
public void write(int value) throws IOException
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
write
public void write(byte[] b, int off, int len) throws IOException
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
flush
public void flush() throws IOException
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
getWrappedOutputStream
public OutputStream getWrappedOutputStream()
- Specified by:
getWrappedOutputStream
in interfaceOutputStreamWrapper
- Returns:
- the underlying input stream wrapped by this class.
-
-