public class FileNameUtil extends Object
| Constructor and Description | 
|---|
| FileNameUtil(Map<String,String> uncompressSuffix,
            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 | 
|---|---|
| String | getCompressedFilename(String filename)Maps the given filename to the name that the file should have after
 compression. | 
| String | getUncompressedFilename(String filename)Maps the given name of a compressed file to the name that the
 file should have after uncompression. | 
| boolean | isCompressedFilename(String filename)Detects common format suffixes in the given filename. | 
public FileNameUtil(Map<String,String> uncompressSuffix, String defaultExtension)
uncompressSuffix - Map from common filename 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 filename when the file is uncompressed.defaultExtension - the format's default extension like ".gz"public boolean isCompressedFilename(String filename)
filename - name of a filetrue if the filename has a common format suffix,
         false otherwisepublic String getUncompressedFilename(String filename)
filename - name of a filepublic String getCompressedFilename(String filename)
filename - name of a fileCopyright © 2018 The Apache Software Foundation. All rights reserved.