Package alluxio.cli.bundler
Class TarUtils
- java.lang.Object
-
- alluxio.cli.bundler.TarUtils
-
public class TarUtils extends java.lang.ObjectUtilities for generating .tar.gz files. Ref: https://memorynotfound.com/java-tar-example-compress-decompress-tar-tar-gz-files/
-
-
Constructor Summary
Constructors Constructor Description TarUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcompress(java.lang.String tarballName, java.io.File... files)Compresses a list of files to one destination.static voiddecompress(java.lang.String in, java.io.File out)Decompresses a tarball to one destination.
-
-
-
Method Detail
-
compress
public static void compress(java.lang.String tarballName, java.io.File... files) throws java.io.IOExceptionCompresses a list of files to one destination.- Parameters:
tarballName- destination path of the .tar.gz filefiles- a list of files to add to the tarball- Throws:
java.io.IOException
-
decompress
public static void decompress(java.lang.String in, java.io.File out) throws java.io.IOExceptionDecompresses a tarball to one destination.- Parameters:
in- the input file pathout- destination to decompress files to- Throws:
java.io.IOException
-
-