public static enum CompressionUtil.Algorithm extends Enum<CompressionUtil.Algorithm>
| Modifier and Type | Method and Description |
|---|---|
static CompressionUtil.Algorithm |
findByFileExtension(String fileExt)
Finds the matching compression algorithm by performing a case insensitive
search based on its file extension such as "gz" for gzip.
|
static CompressionUtil.Algorithm |
findByName(String name)
Finds the matching compression algorithm by performing a case insensitive
search based on its name such as "gzip".
|
String |
getFileExtension()
Gets the extension associated with this compression algorithm such
as "gz" for gzip or "zip" for zip.
|
String |
getName()
Gets the name of this compression algorithm such as "gzip".
|
static CompressionUtil.Algorithm |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CompressionUtil.Algorithm[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CompressionUtil.Algorithm GZIP
public static final CompressionUtil.Algorithm ZIP
public static CompressionUtil.Algorithm[] values()
for (CompressionUtil.Algorithm c : CompressionUtil.Algorithm.values()) System.out.println(c);
public static CompressionUtil.Algorithm 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 getFileExtension()
public static CompressionUtil.Algorithm findByName(String name)
name - The algorithm name such as "gzip" or "zip"public static CompressionUtil.Algorithm findByFileExtension(String fileExt)
name - The algorithm file extension such as "gz" or "zip"Copyright © 2012-2015 Cloudhopper by Twitter. All Rights Reserved.