public enum ArchiveFormat extends java.lang.Enum<ArchiveFormat>
Enum Constant and Description |
---|
AR
Constant used to identify the AR archive format.
|
CPIO
Constant used to identify the CPIO archive format.
|
DUMP
Constant used to identify the Unix DUMP archive format.
|
JAR
Constant used to identify the JAR archive format.
|
SEVEN_Z
Constant used to identify the 7z archive format.
|
TAR
Constant used to identify the TAR archive format.
|
ZIP
Constant used to identify the ZIP archive format.
|
Modifier and Type | Method and Description |
---|---|
static ArchiveFormat |
fromString(java.lang.String archiveFormat)
Attempts to return the
ArchiveFormat 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 archive format is identified.
|
static boolean |
isValidArchiveFormat(java.lang.String archiveFormat)
Checks if the given archive format name is valid and known format.
|
static ArchiveFormat |
valueOf(java.lang.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 AR
public static final ArchiveFormat CPIO
public static final ArchiveFormat DUMP
public static final ArchiveFormat JAR
public static final ArchiveFormat SEVEN_Z
public static final ArchiveFormat TAR
public static final ArchiveFormat ZIP
public static ArchiveFormat[] values()
for (ArchiveFormat c : ArchiveFormat.values()) System.out.println(c);
public static ArchiveFormat 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 isValidArchiveFormat(java.lang.String archiveFormat)
archiveFormat
- the archive format namepublic static ArchiveFormat fromString(java.lang.String archiveFormat)
ArchiveFormat
instance from a possible given string representation. Ignores case.archiveFormat
- string representation of the archive format. E.g. "tar" or "ZIP".java.lang.IllegalArgumentException
- if the given archive format is unknown.