Class SnappyDecompressor.SnappyDirectDecompressor
java.lang.Object
org.apache.hadoop.io.compress.snappy.SnappyDecompressor
org.apache.hadoop.io.compress.snappy.SnappyDecompressor.SnappyDirectDecompressor
- All Implemented Interfaces:
Decompressor,DirectDecompressor
- Enclosing class:
- SnappyDecompressor
public static class SnappyDecompressor.SnappyDirectDecompressor
extends SnappyDecompressor
implements DirectDecompressor
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.io.compress.snappy.SnappyDecompressor
SnappyDecompressor.SnappyDirectDecompressor -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintdecompress(byte[] b, int off, int len) Fills specified buffer with uncompressed data.voiddecompress(ByteBuffer src, ByteBuffer dst) booleanfinished()Returns true if the end of the decompressed data output stream has been reached.voidreset()Resets decompressor and input and output buffers so that a new set of input data can be processed.voidsetDictionary(byte[] b, int off, int len) Does nothing.Methods inherited from class org.apache.hadoop.io.compress.snappy.SnappyDecompressor
end, getRemaining, needsDictionary, needsInput, setInput
-
Constructor Details
-
SnappyDirectDecompressor
public SnappyDirectDecompressor()
-
-
Method Details
-
finished
public boolean finished()Description copied from class:SnappyDecompressorReturns true if the end of the decompressed data output stream has been reached.- Specified by:
finishedin interfaceDecompressor- Overrides:
finishedin classSnappyDecompressor- Returns:
trueif the end of the decompressed data output stream has been reached.
-
reset
public void reset()Description copied from interface:DecompressorResets decompressor and input and output buffers so that a new set of input data can be processed. IfDecompressor.finished()} returnstrueandDecompressor.getRemaining()returns a positive value, reset() is called before processing of the next data stream in the concatenated data stream.Decompressor.finished()will be reset and will returnfalsewhen reset() is called.- Specified by:
resetin interfaceDecompressor- Overrides:
resetin classSnappyDecompressor
-
decompress
- Specified by:
decompressin interfaceDirectDecompressor- Throws:
IOException
-
setDictionary
public void setDictionary(byte[] b, int off, int len) Description copied from class:SnappyDecompressorDoes nothing.- Specified by:
setDictionaryin interfaceDecompressor- Overrides:
setDictionaryin classSnappyDecompressor- Parameters:
b- Dictionary data bytesoff- Start offsetlen- Length
-
decompress
public int decompress(byte[] b, int off, int len) Description copied from class:SnappyDecompressorFills specified buffer with uncompressed data. Returns actual number of bytes of uncompressed data. A return value of 0 indicates thatSnappyDecompressor.needsInput()should be called in order to determine if more input data is required.- Specified by:
decompressin interfaceDecompressor- Overrides:
decompressin classSnappyDecompressor- Parameters:
b- Buffer for the uncompressed dataoff- Start offset of the datalen- Size of the buffer- Returns:
- The actual number of bytes of compressed data.
-