|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.io.compress.SnappyCodec
public class SnappyCodec
This class creates snappy compressors/decompressors.
Constructor Summary | |
---|---|
SnappyCodec()
|
Method Summary | |
---|---|
Compressor |
createCompressor()
Create a new Compressor for use by this CompressionCodec . |
Decompressor |
createDecompressor()
Create a new Decompressor for use by this CompressionCodec . |
CompressionInputStream |
createInputStream(InputStream in)
Create a CompressionInputStream that will read from the given
input stream. |
CompressionInputStream |
createInputStream(InputStream in,
Decompressor decompressor)
Create a CompressionInputStream that will read from the given
InputStream with the given Decompressor . |
CompressionOutputStream |
createOutputStream(OutputStream out)
Create a CompressionOutputStream that will write to the given
OutputStream . |
CompressionOutputStream |
createOutputStream(OutputStream out,
Compressor compressor)
Create a CompressionOutputStream that will write to the given
OutputStream with the given Compressor . |
Class<? extends Compressor> |
getCompressorType()
Get the type of Compressor needed by this CompressionCodec . |
Configuration |
getConf()
Return the configuration used by this object. |
Class<? extends Decompressor> |
getDecompressorType()
Get the type of Decompressor needed by this CompressionCodec . |
String |
getDefaultExtension()
Get the default filename extension for this kind of compression. |
static boolean |
isNativeSnappyLoaded(Configuration conf)
Are the native snappy libraries loaded & initialized? |
void |
setConf(Configuration conf)
Set the configuration to be used by this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SnappyCodec()
Method Detail |
---|
public void setConf(Configuration conf)
setConf
in interface Configurable
conf
- the configuration object.public Configuration getConf()
getConf
in interface Configurable
public static boolean isNativeSnappyLoaded(Configuration conf)
conf
- configuration
public CompressionOutputStream createOutputStream(OutputStream out) throws IOException
CompressionOutputStream
that will write to the given
OutputStream
.
createOutputStream
in interface CompressionCodec
out
- the location for the final output stream
IOException
public CompressionOutputStream createOutputStream(OutputStream out, Compressor compressor) throws IOException
CompressionOutputStream
that will write to the given
OutputStream
with the given Compressor
.
createOutputStream
in interface CompressionCodec
out
- the location for the final output streamcompressor
- compressor to use
IOException
public Class<? extends Compressor> getCompressorType()
Compressor
needed by this CompressionCodec
.
getCompressorType
in interface CompressionCodec
public Compressor createCompressor()
Compressor
for use by this CompressionCodec
.
createCompressor
in interface CompressionCodec
public CompressionInputStream createInputStream(InputStream in) throws IOException
CompressionInputStream
that will read from the given
input stream.
createInputStream
in interface CompressionCodec
in
- the stream to read compressed bytes from
IOException
public CompressionInputStream createInputStream(InputStream in, Decompressor decompressor) throws IOException
CompressionInputStream
that will read from the given
InputStream
with the given Decompressor
.
createInputStream
in interface CompressionCodec
in
- the stream to read compressed bytes fromdecompressor
- decompressor to use
IOException
public Class<? extends Decompressor> getDecompressorType()
Decompressor
needed by this CompressionCodec
.
getDecompressorType
in interface CompressionCodec
public Decompressor createDecompressor()
Decompressor
for use by this CompressionCodec
.
createDecompressor
in interface CompressionCodec
public String getDefaultExtension()
getDefaultExtension
in interface CompressionCodec
.snappy
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |