public enum Codecs extends 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(String abbreviation)
Gets the
Codecs by its abbreviation. |
String |
getAbbreviation()
Gets the main abbreviation.
|
String[] |
getAbbreviations()
Gets the abbreviations.
|
CodecInfo |
getCodecInfo()
Gets the codec info.
|
static CodecInfo |
getCodecInfo(String abbreviation)
Gets the
CodecInfo by Codecs abbreviation. |
static Codecs |
valueOf(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 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(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic CodecInfo getCodecInfo()
public String getAbbreviation()
public String[] getAbbreviations()
public static Codecs get(String abbreviation)
Codecs by its abbreviation. Lookup returns NULL if abbreviation hasn't been
registered.abbreviation - the abbreviationpublic static CodecInfo getCodecInfo(String abbreviation)
CodecInfo by Codecs abbreviation. Lookup returns NULL if abbreviation
hasn't been registered.abbreviation - the abbreviationget(String)