org.apache.avro.file
Class CodecFactory

java.lang.Object
  extended by org.apache.avro.file.CodecFactory

public abstract class CodecFactory
extends Object

Encapsulates the ability to specify and configure a compression codec.


Constructor Summary
CodecFactory()
           
 
Method Summary
static CodecFactory addCodec(String name, CodecFactory c)
          Adds a new codec implementation.
protected abstract  org.apache.avro.file.Codec createInstance()
          Creates internal Codec.
static CodecFactory deflateCodec(int compressionLevel)
          Deflate codec, with specific compression.
static CodecFactory fromString(String s)
          Maps a codec name into a CodecOption.
static CodecFactory nullCodec()
          Null codec, for no compression.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CodecFactory

public CodecFactory()
Method Detail

nullCodec

public static CodecFactory nullCodec()
Null codec, for no compression.


deflateCodec

public static CodecFactory deflateCodec(int compressionLevel)
Deflate codec, with specific compression. compressionLevel should be between 1 and 9, inclusive.


createInstance

protected abstract org.apache.avro.file.Codec createInstance()
Creates internal Codec.


fromString

public static CodecFactory fromString(String s)
Maps a codec name into a CodecOption.


addCodec

public static CodecFactory addCodec(String name,
                                    CodecFactory c)
Adds a new codec implementation. If name already had a codec associated with it, returns the previous codec.


toString

public String toString()
Overrides:
toString in class Object


Copyright © 2010 The Apache Software Foundation