public class BZip2DummyDecompressor extends Object implements Decompressor
| 构造器和说明 |
|---|
BZip2DummyDecompressor() |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
decompress(byte[] b,
int off,
int len)
Fills specified buffer with uncompressed data.
|
void |
end()
Closes the decompressor and discards any unprocessed input.
|
boolean |
finished()
Returns true if the end of the decompressed
data output stream has been reached.
|
int |
getRemaining()
Returns the number of bytes remaining in the compressed-data buffer;
typically called after the decompressor has finished decompressing
the current gzip stream (a.k.a.
|
boolean |
needsDictionary()
Returns
true if a preset dictionary is needed for decompression. |
boolean |
needsInput()
Returns true if the input data buffer is empty and
Decompressor.setInput(byte[], int, int) should be called to
provide more input. |
void |
reset()
Resets decompressor and input and output buffers 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.
|
public int decompress(byte[] b,
int off,
int len)
throws IOException
DecompressorDecompressor.needsInput() should be called in order to determine if more
input data is required.decompress 在接口中 Decompressorb - Buffer for the compressed dataoff - Start offset of the datalen - Size of the bufferIOExceptionpublic void end()
Decompressorend 在接口中 Decompressorpublic boolean finished()
Decompressorfinished 在接口中 Decompressortrue if the end of the decompressed
data output stream has been reached.public boolean needsDictionary()
Decompressortrue if a preset dictionary is needed for decompression.needsDictionary 在接口中 Decompressortrue if a preset dictionary is needed for decompressionpublic boolean needsInput()
DecompressorDecompressor.setInput(byte[], int, int) should be called to
provide more input.needsInput 在接口中 Decompressortrue if the input data buffer is empty and
Decompressor.setInput(byte[], int, int) should be called in
order to provide more input.public int getRemaining()
DecompressorgetRemaining 在接口中 Decompressorpublic void reset()
Decompressorreset 在接口中 Decompressorpublic void setDictionary(byte[] b,
int off,
int len)
DecompressorsetDictionary 在接口中 Decompressorb - Dictionary data bytesoff - Start offsetlen - Lengthpublic void setInput(byte[] b,
int off,
int len)
DecompressorDecompressor.needsInput() returns
true indicating that more input data is required.
(Both native and non-native versions of various Decompressors require
that the data passed in via b[] remain unmodified until
the caller is explicitly notified--via Decompressor.needsInput()--that the
buffer may be safely modified. With this requirement, an extra
buffer-copy can be avoided.)setInput 在接口中 Decompressorb - Input dataoff - Start offsetlen - LengthCopyright © 2009 The Apache Software Foundation