public enum Codecs extends java.lang.Enum<Codecs>
This enum also allows case insensitive lookup for main abbreviation. Defined abbreviations strings in a constructor are just keywords to do back mapping from a lookup table. Registering a mixing abbreviations is not checked.
Codecs.get("gz").getAbbreviation(); "GZIP"
| Enum Constant and Description |
|---|
BZIP2
Splittable
BZip2Codec. |
GZIP
Non-splittable
GzipCodec. |
LZO
Non-splittable
LzoCodec. |
LZOP
Non-splittable
LzopCodec. |
SNAPPY
Non-splittable
SnappyCodec. |
| Modifier and Type | Method and Description |
|---|---|
static Codecs |
get(java.lang.String abbreviation)
Gets the
Codecs by its abbreviation. |
java.lang.String |
getAbbreviation()
Gets the main abbreviation.
|
java.lang.String[] |
getAbbreviations()
Gets the abbreviations.
|
CodecInfo |
getCodecInfo()
Gets the codec info.
|
static CodecInfo |
getCodecInfo(java.lang.String abbreviation)
Gets the
CodecInfo by Codecs abbreviation. |
static Codecs |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Codecs[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Codecs GZIP
GzipCodec.public static final Codecs SNAPPY
SnappyCodec. This codec will need native snappy libraries.public static final Codecs BZIP2
BZip2Codec.public static final Codecs LZO
LzoCodec.public static final Codecs LZOP
LzopCodec.public static Codecs[] values()
for (Codecs c : Codecs.values()) System.out.println(c);
public static Codecs valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic CodecInfo getCodecInfo()
public java.lang.String getAbbreviation()
public java.lang.String[] getAbbreviations()
public static Codecs get(java.lang.String abbreviation)
Codecs by its abbreviation. Lookup returns NULL if abbreviation hasn't been
registered.abbreviation - the abbreviationpublic static CodecInfo getCodecInfo(java.lang.String abbreviation)
CodecInfo by Codecs abbreviation. Lookup returns NULL if abbreviation
hasn't been registered.abbreviation - the abbreviationget(String)