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
- IOException
public static void zip(String parentDir, String[] inputFiles, String outputFile) throws IOException
IOException
public static List<File> unTar(String inputFileName, String outputDirName) throws FileNotFoundException, IOException, org.apache.commons.compress.archivers.ArchiveException
inputFile
- the input .tar fileoutputDir
- the output directory file.List
of File
s with the untared content.IOException
FileNotFoundException
org.apache.commons.compress.archivers.ArchiveException
public static List<File> unTar(String inputFileName, String outputDirName, boolean flatten) throws FileNotFoundException, IOException, org.apache.commons.compress.archivers.ArchiveException
inputFile
- the input .tar fileoutputDir
- the output directory file.List
of File
s with the untared content.IOException
FileNotFoundException
org.apache.commons.compress.archivers.ArchiveException
Copyright © 2016 The Apache Software Foundation. All rights reserved.