public enum ArchiveFormat extends java.lang.Enum<ArchiveFormat>
| Enum Constant and Description |
|---|
TAR |
TAR_BZIP2 |
TAR_GZIP |
TAR_XZ |
ZIP |
| Modifier and Type | Method and Description |
|---|---|
ArchiveReader |
createReader(java.io.InputStream is) |
abstract ArchiveReader |
createReader(java.io.InputStream is,
java.lang.String prefix) |
abstract ArchiveWriter |
createWriter(java.io.OutputStream os) |
static ArchiveFormat |
findFormat(java.nio.file.Path fName) |
static ArchiveFormat |
findFormat(java.lang.String fName)
Tries to find a supported
ArchiveFormat for a given file name. |
java.util.Set<java.lang.String> |
getFileExtensions() |
java.lang.String |
getName() |
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 ZIP
public static final ArchiveFormat TAR
public static final ArchiveFormat TAR_XZ
public static final ArchiveFormat TAR_GZIP
public static final ArchiveFormat TAR_BZIP2
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.util.Set<java.lang.String> getFileExtensions()
public static ArchiveFormat findFormat(java.lang.String fName)
ArchiveFormat for a given file name.
This makes assumptions based on the Extension of the file.fName - The File name.ArchiveFormat or null if one cannot be found.public static ArchiveFormat findFormat(java.nio.file.Path fName)
public ArchiveReader createReader(java.io.InputStream is) throws java.io.IOException
java.io.IOExceptionpublic abstract ArchiveReader createReader(java.io.InputStream is, java.lang.String prefix) throws java.io.IOException
java.io.IOExceptionpublic abstract ArchiveWriter createWriter(java.io.OutputStream os) throws java.io.IOException
java.io.IOException