public enum CompressionType extends java.lang.Enum<CompressionType>
Enum Constant and Description |
---|
BZIP2
Constant used to identify the BZIP2 compression algorithm.
|
GZIP
Constant used to identify the GZIP compression algorithm.
|
PACK200
Constant used to identify the PACK200 compression algorithm.
|
XZ
Constant used to identify the XZ compression algorithm.
|
Modifier and Type | Method and Description |
---|---|
static CompressionType |
fromString(java.lang.String compression)
Attempts to return the
CompressionType instance from a possible given string representation. |
java.lang.String |
getDefaultFileExtension()
Returns the default file extension for this compression type.
|
java.lang.String |
getName()
Returns the name by which the compression algorithm is identified.
|
static boolean |
isValidCompressionType(java.lang.String compression)
Checks if the given compression type name is valid and known format.
|
static CompressionType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static CompressionType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CompressionType BZIP2
public static final CompressionType GZIP
public static final CompressionType XZ
public static final CompressionType PACK200
public static CompressionType[] values()
for (CompressionType c : CompressionType.values()) System.out.println(c);
public static CompressionType 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 java.lang.String getName()
public java.lang.String getDefaultFileExtension()
public static boolean isValidCompressionType(java.lang.String compression)
compression
- the compression algorithm namepublic static CompressionType fromString(java.lang.String compression)
CompressionType
instance from a possible given string representation. Ignores
case.compression
- string representation of the compression type. E.g. "GZIP".java.lang.IllegalArgumentException
- if the given compression type is unknown.