public class CompressionUtils extends Object
| Constructor and Description |
|---|
CompressionUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
tar(String parentDir,
String[] inputFiles,
String outputFile)
Archive all the files in the inputFiles into outputFile
|
static List<File> |
unTar(String inputFileName,
String outputDirName)
Untar an input file into an output file.
|
static List<File> |
unTar(String inputFileName,
String outputDirName,
boolean flatten)
Untar an input file into an output file.
|
static void |
zip(String parentDir,
String[] inputFiles,
String outputFile) |
public static void tar(String parentDir, String[] inputFiles, String outputFile) throws IOException
inputFiles - outputFile - IOExceptionpublic static void zip(String parentDir, String[] inputFiles, String outputFile) throws IOException
IOExceptionpublic static List<File> unTar(String inputFileName, String outputDirName) throws FileNotFoundException, IOException, org.apache.commons.compress.archivers.ArchiveException
inputFileName - the input .tar fileoutputDirName - the output directory file.List of Files with the untared content.IOExceptionFileNotFoundExceptionorg.apache.commons.compress.archivers.ArchiveExceptionpublic static List<File> unTar(String inputFileName, String outputDirName, boolean flatten) throws FileNotFoundException, IOException, org.apache.commons.compress.archivers.ArchiveException
inputFileName - the input .tar fileoutputDirName - the output directory file.List of Files with the untared content.IOExceptionFileNotFoundExceptionorg.apache.commons.compress.archivers.ArchiveExceptionCopyright © 2019 The Apache Software Foundation. All Rights Reserved.