public final class FileType extends Object
ArchiveFormat and/or CompressionType.| Modifier and Type | Field and Description |
|---|---|
static FileType |
UNKNOWN
Special case object for an unknown archive/compression file type.
|
| Modifier and Type | Method and Description |
|---|---|
static FileType |
get(File file)
Checks the suffix of the given
File for an entry in the map. |
static FileType |
get(String filename)
Checks the suffix of the given string for an entry in the map.
|
ArchiveFormat |
getArchiveFormat()
Returns the archive format corresponding to this file extension if any.
|
CompressionType |
getCompressionType()
Returns the compression type corresponding to this file extension if any.
|
String |
getSuffix()
Returns the file extension suffix (e.g.
|
boolean |
isArchive()
Returns true if the given file extension denotes an archive.
|
boolean |
isCompressed()
Returns true if the given file extension denotes a compressed file.
|
String |
toString() |
public static final FileType UNKNOWN
public boolean isArchive()
public boolean isCompressed()
public String getSuffix()
public ArchiveFormat getArchiveFormat()
public CompressionType getCompressionType()
public static FileType get(String filename)
FileType
entry will be returned.filename - the filename to checkFileType entry for the file extension of the given name, or the UNKNOWN type if it does not
existpublic static FileType get(File file)
File for an entry in the map. If it exists, the corresponding
FileType entry will be returned.file - the file to checkFileType entry for the file extension of the given file, or the UNKNOWN type if it does not
existCopyright © 2013-2015. All Rights Reserved.