public class FileNameUtil
extends java.lang.Object
| Constructor and Description |
|---|
FileNameUtil(java.util.Map<java.lang.String,java.lang.String> uncompressSuffix,
java.lang.String defaultExtension)
sets up the utility with a map of known compressed to uncompressed suffix mappings and the default extension of the format.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getCompressedFilename(java.lang.String fileName)
Deprecated.
|
java.lang.String |
getCompressedFileName(java.lang.String fileName)
Maps the given file name to the name that the file should have after compression.
|
java.lang.String |
getUncompressedFilename(java.lang.String fileName)
Deprecated.
|
java.lang.String |
getUncompressedFileName(java.lang.String fileName)
Maps the given name of a compressed file to the name that the file should have after uncompression.
|
boolean |
isCompressedFilename(java.lang.String fileName)
Deprecated.
|
boolean |
isCompressedFileName(java.lang.String fileName)
Detects common format suffixes in the given file name.
|
public FileNameUtil(java.util.Map<java.lang.String,java.lang.String> uncompressSuffix,
java.lang.String defaultExtension)
uncompressSuffix - Map from common file name suffixes of compressed files to the corresponding suffixes of uncompressed files. For example: from
".tgz" to ".tar". This map also contains format-specific suffixes like ".gz" and "-z". These suffixes are mapped to the empty
string, as they should simply be removed from the file name when the file is uncompressed.defaultExtension - the format's default extension like ".gz"@Deprecated public java.lang.String getCompressedFilename(java.lang.String fileName)
getCompressedFileName(String).fileName - name of a filepublic java.lang.String getCompressedFileName(java.lang.String fileName)
fileName - name of a file@Deprecated public java.lang.String getUncompressedFilename(java.lang.String fileName)
getUncompressedFileName(String).fileName - name of a filepublic java.lang.String getUncompressedFileName(java.lang.String fileName)
fileName - name of a file@Deprecated public boolean isCompressedFilename(java.lang.String fileName)
isCompressedFileName(String).fileName - name of a filetrue if the file name has a common format suffix, false otherwisepublic boolean isCompressedFileName(java.lang.String fileName)
fileName - name of a filetrue if the file name has a common format suffix, false otherwiseCopyright © 2010 - 2024 Adobe. All Rights Reserved