public class SnappyCodec extends Object implements Configurable, CompressionCodec, DirectDecompressionCodec
CompressionCodec.Util
Constructor and Description |
---|
SnappyCodec() |
public SnappyCodec()
public void setConf(Configuration conf)
setConf
in interface Configurable
conf
- the configuration object.public Configuration getConf()
getConf
in interface Configurable
public static void checkNativeCodeLoaded()
public static boolean isNativeCodeLoaded()
public static String getLibraryName()
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 streamIOException
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 useIOException
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 fromIOException
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 useIOException
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 DirectDecompressor createDirectDecompressor()
DirectDecompressor
for use by this DirectDecompressionCodec
.createDirectDecompressor
in interface DirectDecompressionCodec
public String getDefaultExtension()
getDefaultExtension
in interface CompressionCodec
.snappy
.Copyright © 2017 Apache Software Foundation. All Rights Reserved.