public enum ArchiveFormat extends Enum<ArchiveFormat>
Enum Constant and Description |
---|
TAR |
TAR_BZ2 |
TAR_GZ |
TAR_XZ |
TAR_ZSTD |
ZIP |
Modifier and Type | Method and Description |
---|---|
String |
getExtension()
Get the extension (including '.') for this archive type
|
static com.google.common.collect.ImmutableList<String> |
getFileExtensions()
Get all available file extensions
|
static Optional<ArchiveFormat> |
getFormatFromFilename(String filename)
Gets the archive format based on a file
|
static Optional<ArchiveFormat> |
getFormatFromShortName(String shortName)
Gets the archive format based on a short name
|
String |
getShortName()
Get the short name for the archive type
|
static com.google.common.collect.ImmutableList<String> |
getShortNames()
Get all available short names
|
Unarchiver |
getUnarchiver()
Get the unarchiver used to extract archives of this type
|
String |
toString() |
static ArchiveFormat |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ArchiveFormat[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ArchiveFormat TAR
public static final ArchiveFormat TAR_BZ2
public static final ArchiveFormat TAR_GZ
public static final ArchiveFormat TAR_XZ
public static final ArchiveFormat TAR_ZSTD
public static final ArchiveFormat ZIP
public static ArchiveFormat[] values()
for (ArchiveFormat c : ArchiveFormat.values()) System.out.println(c);
public static ArchiveFormat 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 static Optional<ArchiveFormat> getFormatFromFilename(String filename)
filename
- The filename to try to usepublic static Optional<ArchiveFormat> getFormatFromShortName(String shortName)
shortName
- The short name used in build filespublic Unarchiver getUnarchiver()
public String getExtension()
public String getShortName()
public String toString()
toString
in class Enum<ArchiveFormat>
public static com.google.common.collect.ImmutableList<String> getShortNames()
public static com.google.common.collect.ImmutableList<String> getFileExtensions()