public class ArchiveManagement extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static org.gcube.common.core.utils.logging.GCUBELog |
logger
Class logger.
|
| Constructor and Description |
|---|
ArchiveManagement() |
| Modifier and Type | Method and Description |
|---|---|
static void |
createTarGz(File targetArchive,
File[] archiveFiles)
Compress Archive Method.
|
static void |
createTarGz(File targetArchive,
List<File> archiveFiles)
Compress Archive Method
|
File |
extractFileFromArchive(File tar,
String pathToFile) |
void |
insertFileToArchive(File tar,
String pathToFile) |
void |
replaceFilesToTarGz(File source,
File file) |
static void |
unTarGz(File sourceArchive)
Uncompress Archive Method ()
|
protected static final org.gcube.common.core.utils.logging.GCUBELog logger
public static void unTarGz(File sourceArchive) throws Exception
sourceArchive - source archiveException - if the uncompress operation failspublic static void createTarGz(File targetArchive, List<File> archiveFiles) throws Exception
targetArchive - archive filearchiveFiles - List of files to include in TAR GZException - if the compression failspublic static void createTarGz(File targetArchive, File[] archiveFiles) throws Exception
targetArchive - archive filearchiveFiles - Array of files to include in TAR GZ. The first entry
in the array is the source root directory. It is used to calculate relative path.
If it is not supplied the archive will not have directory tree.Exception - if the compression failspublic File extractFileFromArchive(File tar, String pathToFile) throws IOException
IOExceptionpublic void insertFileToArchive(File tar, String pathToFile) throws IOException
IOExceptionCopyright © 2015. All Rights Reserved.