org.apache.hadoop.io.compress
Class GzipCodec.GzipInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by org.apache.hadoop.io.compress.CompressionInputStream
          extended by org.apache.hadoop.io.compress.DecompressorStream
              extended by org.apache.hadoop.io.compress.GzipCodec.GzipInputStream
All Implemented Interfaces:
Closeable
Enclosing class:
GzipCodec

protected static class GzipCodec.GzipInputStream
extends DecompressorStream


Field Summary
 
Fields inherited from class org.apache.hadoop.io.compress.DecompressorStream
buffer, closed, decompressor, eof
 
Fields inherited from class org.apache.hadoop.io.compress.CompressionInputStream
in
 
Constructor Summary
protected GzipCodec.GzipInputStream(DecompressorStream in)
          Allow subclasses to directly set the inflater stream.
  GzipCodec.GzipInputStream(InputStream in)
           
 
Method Summary
 int available()
           
 void close()
           
 int read()
           
 int read(byte[] data, int offset, int len)
          Read bytes from the stream.
 void resetState()
          Reset the decompressor to its initial state and discard any buffered data, as the underlying stream may have been repositioned.
 long skip(long offset)
           
 
Methods inherited from class org.apache.hadoop.io.compress.DecompressorStream
checkStream, decompress, getCompressedData, mark, markSupported, reset
 
Methods inherited from class java.io.InputStream
read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GzipCodec.GzipInputStream

public GzipCodec.GzipInputStream(InputStream in)
                          throws IOException
Throws:
IOException

GzipCodec.GzipInputStream

protected GzipCodec.GzipInputStream(DecompressorStream in)
Allow subclasses to directly set the inflater stream.

Method Detail

available

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

close

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

read

public int read()
         throws IOException
Overrides:
read in class DecompressorStream
Throws:
IOException

read

public int read(byte[] data,
                int offset,
                int len)
         throws IOException
Description copied from class: CompressionInputStream
Read bytes from the stream. Made abstract to prevent leakage to underlying stream.

Overrides:
read in class DecompressorStream
Throws:
IOException

skip

public long skip(long offset)
          throws IOException
Overrides:
skip in class DecompressorStream
Throws:
IOException

resetState

public void resetState()
                throws IOException
Description copied from class: CompressionInputStream
Reset the decompressor to its initial state and discard any buffered data, as the underlying stream may have been repositioned.

Overrides:
resetState in class DecompressorStream
Throws:
IOException


Copyright © 2009 The Apache Software Foundation