public enum CompressionType extends 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(String compression)
Attempts to return the
CompressionType instance from a possible given string representation. |
String |
getDefaultFileExtension()
Returns the default file extension for this compression type.
|
String |
getName()
Returns the name by which the compression algorithm is identified.
|
static boolean |
isValidCompressionType(String compression)
Checks if the given compression type name is valid and known format.
|
static CompressionType |
valueOf(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(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 String getName()
public String getDefaultFileExtension()
public static boolean isValidCompressionType(String compression)
compression - the compression algorithm namepublic static CompressionType fromString(String compression)
CompressionType instance from a possible given string representation. Ignores
case.compression - string representation of the compression type. E.g. "GZIP".IllegalArgumentException - if the given compression type is unknown.Copyright © 2013-2015. All Rights Reserved.