|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.io.compress.BZip2Codec
public class BZip2Codec
This class provides CompressionOutputStream and CompressionInputStream for compression and decompression. Currently we dont have an implementation of the Compressor and Decompressor interfaces, so those methods of CompressionCodec which have a Compressor or Decompressor type argument, throw UnsupportedOperationException.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.hadoop.io.compress.SplittableCompressionCodec |
---|
SplittableCompressionCodec.READ_MODE |
Constructor Summary | |
---|---|
BZip2Codec()
Creates a new instance of BZip2Codec |
Method Summary | |
---|---|
Compressor |
createCompressor()
This functionality is currently not supported. |
Decompressor |
createDecompressor()
This functionality is currently not supported. |
CompressionInputStream |
createInputStream(InputStream in)
Creates CompressionInputStream to be used to read off uncompressed data. |
CompressionInputStream |
createInputStream(InputStream in,
Decompressor decompressor)
This functionality is currently not supported. |
SplitCompressionInputStream |
createInputStream(InputStream seekableIn,
Decompressor decompressor,
long start,
long end,
SplittableCompressionCodec.READ_MODE readMode)
Creates CompressionInputStream to be used to read off uncompressed data in one of the two reading modes. |
CompressionOutputStream |
createOutputStream(OutputStream out)
Creates CompressionOutputStream for BZip2 |
CompressionOutputStream |
createOutputStream(OutputStream out,
Compressor compressor)
Creates a compressor using given OutputStream. |
Class<? extends Compressor> |
getCompressorType()
This functionality is currently not supported. |
Class<? extends Decompressor> |
getDecompressorType()
This functionality is currently not supported. |
String |
getDefaultExtension()
.bz2 is recognized as the default extension for compressed BZip2 files |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BZip2Codec()
Method Detail |
---|
public CompressionOutputStream createOutputStream(OutputStream out) throws IOException
createOutputStream
in interface CompressionCodec
out
- The output Stream
IOException
- Throws IO exceptionpublic CompressionOutputStream createOutputStream(OutputStream out, Compressor compressor) throws IOException
createOutputStream
in interface CompressionCodec
out
- the location for the final output streamcompressor
- compressor to use
IOException
public Class<? extends Compressor> getCompressorType()
getCompressorType
in interface CompressionCodec
public Compressor createCompressor()
createCompressor
in interface CompressionCodec
public CompressionInputStream createInputStream(InputStream in) throws IOException
createInputStream
in interface CompressionCodec
in
- The InputStream
IOException
- Throws IOExceptionpublic CompressionInputStream createInputStream(InputStream in, Decompressor decompressor) throws IOException
createInputStream
in interface CompressionCodec
in
- the stream to read compressed bytes fromdecompressor
- decompressor to use
IOException
public SplitCompressionInputStream createInputStream(InputStream seekableIn, Decompressor decompressor, long start, long end, SplittableCompressionCodec.READ_MODE readMode) throws IOException
createInputStream
in interface SplittableCompressionCodec
seekableIn
- The InputStreamstart
- The start offset into the compressed streamend
- The end offset into the compressed streamreadMode
- Controls whether progress is reported continuously or
only at block boundaries.
IOException
public Class<? extends Decompressor> getDecompressorType()
getDecompressorType
in interface CompressionCodec
public Decompressor createDecompressor()
createDecompressor
in interface CompressionCodec
public String getDefaultExtension()
getDefaultExtension
in interface CompressionCodec
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |