public class SnappyCodec extends Object implements Configurable, CompressionCodec
| 构造器和说明 |
|---|
SnappyCodec() |
| 限定符和类型 | 方法和说明 |
|---|---|
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.
|
public void setConf(Configuration conf)
setConf 在接口中 Configurableconf - the configuration object.public Configuration getConf()
getConf 在接口中 Configurablepublic static boolean isNativeSnappyLoaded(Configuration conf)
conf - configurationpublic CompressionOutputStream createOutputStream(OutputStream out) throws IOException
CompressionOutputStream that will write to the given
OutputStream.createOutputStream 在接口中 CompressionCodecout - the location for the final output streamIOExceptionpublic CompressionOutputStream createOutputStream(OutputStream out, Compressor compressor) throws IOException
CompressionOutputStream that will write to the given
OutputStream with the given Compressor.createOutputStream 在接口中 CompressionCodecout - the location for the final output streamcompressor - compressor to useIOExceptionpublic Class<? extends Compressor> getCompressorType()
Compressor needed by this CompressionCodec.getCompressorType 在接口中 CompressionCodecpublic Compressor createCompressor()
Compressor for use by this CompressionCodec.createCompressor 在接口中 CompressionCodecpublic CompressionInputStream createInputStream(InputStream in) throws IOException
CompressionInputStream that will read from the given
input stream.createInputStream 在接口中 CompressionCodecin - the stream to read compressed bytes fromIOExceptionpublic CompressionInputStream createInputStream(InputStream in, Decompressor decompressor) throws IOException
CompressionInputStream that will read from the given
InputStream with the given Decompressor.createInputStream 在接口中 CompressionCodecin - the stream to read compressed bytes fromdecompressor - decompressor to useIOExceptionpublic Class<? extends Decompressor> getDecompressorType()
Decompressor needed by this CompressionCodec.getDecompressorType 在接口中 CompressionCodecpublic Decompressor createDecompressor()
Decompressor for use by this CompressionCodec.createDecompressor 在接口中 CompressionCodecpublic String getDefaultExtension()
getDefaultExtension 在接口中 CompressionCodec.snappy.Copyright © 2009 The Apache Software Foundation