org.jets3t.service.io
Class GZipInflatingOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by org.jets3t.service.io.GZipInflatingOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable, OutputStreamWrapper

public class GZipInflatingOutputStream
extends java.io.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.


Field Summary
static int GZIP_MAGIC
           
 
Constructor Summary
GZipInflatingOutputStream(java.io.OutputStream outputStream)
           
 
Method Summary
 void close()
           
 void flush()
           
 java.io.OutputStream getWrappedOutputStream()
           
 void write(byte[] b, int off, int len)
           
 void write(int value)
           
 
Methods inherited from class java.io.OutputStream
write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GZIP_MAGIC

public static final int GZIP_MAGIC
See Also:
Constant Field Values
Constructor Detail

GZipInflatingOutputStream

public GZipInflatingOutputStream(java.io.OutputStream outputStream)
                          throws java.io.IOException
Throws:
java.io.IOException
Method Detail

write

public void write(int value)
           throws java.io.IOException
Specified by:
write in class java.io.OutputStream
Throws:
java.io.IOException

write

public void write(byte[] b,
                  int off,
                  int len)
           throws java.io.IOException
Overrides:
write in class java.io.OutputStream
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Specified by:
flush in interface java.io.Flushable
Overrides:
flush in class java.io.OutputStream
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.OutputStream
Throws:
java.io.IOException

getWrappedOutputStream

public java.io.OutputStream getWrappedOutputStream()
Specified by:
getWrappedOutputStream in interface OutputStreamWrapper
Returns:
the underlying input stream wrapped by this class.