Package co.ecg.alpaca.core.framework
Class CompressionUtils
- java.lang.Object
-
- co.ecg.alpaca.core.framework.CompressionUtils
-
public class CompressionUtils extends Object
CompressionUtils class.
- Version:
- $Id: $Id
- Author:
- dkelley on 5/16/17.
-
-
Constructor Summary
Constructors Constructor Description CompressionUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addFileToTarGz(org.apache.commons.compress.archivers.tar.TarArchiveOutputStream tOut, String path, String base)
Adds a file to theTarArchiveOutputStream
static org.apache.commons.compress.archivers.tar.TarArchiveOutputStream
createTarGZ(String tarName)
Create a tarball withe the provided name.static void
decompressTarGz(File context, File tarball)
decompressTarGz.
-
-
-
Method Detail
-
createTarGZ
public static org.apache.commons.compress.archivers.tar.TarArchiveOutputStream createTarGZ(String tarName) throws IOException
Create a tarball withe the provided name.- Parameters:
tarName
- Location of the export files- Returns:
- a
TarArchiveOutputStream
object. - Throws:
IOException
- Thrown if an error occurs while creating a stream.
-
addFileToTarGz
public static void addFileToTarGz(org.apache.commons.compress.archivers.tar.TarArchiveOutputStream tOut, String path, String base) throws IOException
Adds a file to theTarArchiveOutputStream
- Parameters:
tOut
- The TarArchiveOutputStream to add topath
- The path of the file to addbase
- The optional fileName precursor.- Throws:
IOException
- Thrown if an error occurs while adding a file to the tarball.
-
decompressTarGz
public static void decompressTarGz(File context, File tarball) throws IOException
decompressTarGz.
- Parameters:
context
- aFile
object.tarball
- aFile
object.- Throws:
IOException
- if any.
-
-