org.apache.hadoop.io.compress.zlib
Class BuiltInZlibInflater

java.lang.Object
  extended by java.util.zip.Inflater
      extended by org.apache.hadoop.io.compress.zlib.BuiltInZlibInflater
All Implemented Interfaces:
Decompressor

public class BuiltInZlibInflater
extends Inflater
implements Decompressor

A wrapper around java.util.zip.Inflater to make it conform to org.apache.hadoop.io.compress.Decompressor interface.


Constructor Summary
BuiltInZlibInflater()
           
BuiltInZlibInflater(boolean nowrap)
           
 
Method Summary
 int decompress(byte[] b, int off, int len)
          Fills specified buffer with uncompressed data.
 
Methods inherited from class java.util.zip.Inflater
end, finalize, finished, getAdler, getBytesRead, getBytesWritten, getRemaining, getTotalIn, getTotalOut, inflate, inflate, needsDictionary, needsInput, reset, setDictionary, setDictionary, setInput, setInput
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hadoop.io.compress.Decompressor
end, finished, getRemaining, needsDictionary, needsInput, reset, setDictionary, setInput
 

Constructor Detail

BuiltInZlibInflater

public BuiltInZlibInflater(boolean nowrap)

BuiltInZlibInflater

public BuiltInZlibInflater()
Method Detail

decompress

public int decompress(byte[] b,
                      int off,
                      int len)
               throws IOException
Description copied from interface: Decompressor
Fills specified buffer with uncompressed data. Returns actual number of bytes of uncompressed data. A return value of 0 indicates that Decompressor.needsInput() should be called in order to determine if more input data is required.

Specified by:
decompress in interface Decompressor
Parameters:
b - Buffer for the compressed data
off - Start offset of the data
len - Size of the buffer
Returns:
The actual number of bytes of compressed data.
Throws:
IOException


Copyright © 2009 The Apache Software Foundation