org.jets3t.service.io
Class GZipDeflatingInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by org.jets3t.service.io.GZipDeflatingInputStream
All Implemented Interfaces:
Closeable, 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
GZipDeflatingInputStream(InputStream inputStream)
           
 
Method Summary
 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, read, reset, skip
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GZipDeflatingInputStream

public GZipDeflatingInputStream(InputStream inputStream)
                         throws IOException
Throws:
IOException
Method Detail

read

public int read()
         throws IOException
Specified by:
read in class InputStream
Throws:
IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Overrides:
read in class InputStream
Throws:
IOException

available

public int available()
              throws IOException
Overrides:
available in class InputStream
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class InputStream
Throws:
IOException

getWrappedInputStream

public InputStream getWrappedInputStream()
Specified by:
getWrappedInputStream in interface InputStreamWrapper
Returns:
the underlying input stream wrapped by this class.