|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.io.compress.lzo.LzoDecompressor
public class LzoDecompressor
A Decompressor based on the lzo algorithm.
http://www.oberhumer.com/opensource/lzo/
| Nested Class Summary | |
|---|---|
static class |
LzoDecompressor.CompressionStrategy
|
| Constructor Summary | |
|---|---|
LzoDecompressor()
Creates a new lzo decompressor. |
|
LzoDecompressor(LzoDecompressor.CompressionStrategy strategy,
int directBufferSize)
Creates a new lzo decompressor. |
|
| Method Summary | |
|---|---|
int |
decompress(byte[] b,
int off,
int len)
Fills specified buffer with uncompressed data. |
void |
end()
Closes the decompressor and discards any unprocessed input. |
protected void |
finalize()
|
boolean |
finished()
Returns true if the end of the compressed data output stream has been reached. |
static boolean |
isNativeLzoLoaded()
Check if lzo decompressors are loaded and initialized. |
boolean |
needsDictionary()
Returns true if a preset dictionary is needed for decompression. |
boolean |
needsInput()
Returns true if the input data buffer is empty and #setInput() should be called to provide more input. |
void |
reset()
Resets decompressor so that a new set of input data can be processed. |
void |
setDictionary(byte[] b,
int off,
int len)
Sets preset dictionary for compression. |
void |
setInput(byte[] b,
int off,
int len)
Sets input data for decompression. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LzoDecompressor(LzoDecompressor.CompressionStrategy strategy,
int directBufferSize)
strategy - lzo decompression algorithmdirectBufferSize - size of the direct-bufferpublic LzoDecompressor()
| Method Detail |
|---|
public static boolean isNativeLzoLoaded()
true if lzo decompressors are loaded & initialized,
else false
public void setInput(byte[] b,
int off,
int len)
Decompressortrue indicating that more input data is required.
setInput in interface Decompressorb - Input dataoff - Start offsetlen - Length
public void setDictionary(byte[] b,
int off,
int len)
Decompressor
setDictionary in interface Decompressorb - Dictionary data bytesoff - Start offsetlen - Lengthpublic boolean needsInput()
Decompressor
needsInput in interface Decompressortrue if the input data buffer is empty and
#setInput() should be called in order to provide more input.public boolean needsDictionary()
Decompressortrue if a preset dictionary is needed for decompression.
needsDictionary in interface Decompressortrue if a preset dictionary is needed for decompressionpublic boolean finished()
Decompressor
finished in interface Decompressortrue if the end of the compressed
data output stream has been reached.
public int decompress(byte[] b,
int off,
int len)
throws IOException
Decompressor
decompress in interface Decompressorb - Buffer for the compressed dataoff - Start offset of the datalen - Size of the buffer
IOExceptionpublic void reset()
Decompressor
reset in interface Decompressorpublic void end()
Decompressor
end in interface Decompressorprotected void finalize()
finalize in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||