|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.io.compress.bzip2.BZip2DummyCompressor
public class BZip2DummyCompressor
This is a dummy compressor for BZip2.
Constructor Summary | |
---|---|
BZip2DummyCompressor()
|
Method Summary | |
---|---|
int |
compress(byte[] b,
int off,
int len)
Fills specified buffer with compressed data. |
void |
end()
Closes the compressor and discards any unprocessed input. |
void |
finish()
When called, indicates that compression should end with the current contents of the input buffer. |
boolean |
finished()
Returns true if the end of the compressed data output stream has been reached. |
long |
getBytesRead()
Return number of uncompressed bytes input so far. |
long |
getBytesWritten()
Return number of compressed bytes output so far. |
boolean |
needsInput()
Returns true if the input data buffer is empty and #setInput() should be called to provide more input. |
void |
reinit(Configuration conf)
Prepare the compressor to be used in a new stream with settings defined in the given Configuration |
void |
reset()
Resets compressor 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 compression. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BZip2DummyCompressor()
Method Detail |
---|
public int compress(byte[] b, int off, int len) throws IOException
Compressor
compress
in interface Compressor
b
- Buffer for the compressed dataoff
- Start offset of the datalen
- Size of the buffer
IOException
public void end()
Compressor
end
in interface Compressor
public void finish()
Compressor
finish
in interface Compressor
public boolean finished()
Compressor
finished
in interface Compressor
true
if the end of the compressed
data output stream has been reached.public long getBytesRead()
Compressor
getBytesRead
in interface Compressor
public long getBytesWritten()
Compressor
getBytesWritten
in interface Compressor
public boolean needsInput()
Compressor
needsInput
in interface Compressor
true
if the input data buffer is empty and
#setInput() should be called in order to provide more input.public void reset()
Compressor
reset
in interface Compressor
public void setDictionary(byte[] b, int off, int len)
Compressor
setDictionary
in interface Compressor
b
- Dictionary data bytesoff
- Start offsetlen
- Lengthpublic void setInput(byte[] b, int off, int len)
Compressor
true
indicating that more input data is required.
setInput
in interface Compressor
b
- Input dataoff
- Start offsetlen
- Lengthpublic void reinit(Configuration conf)
Compressor
reinit
in interface Compressor
conf
- Configuration from which new setting are fetched
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |