public final class ZipUtils
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ZipUtils.JarPath |
| Constructor and Description |
|---|
ZipUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
compressFiles(java.nio.file.Path[] listFiles,
java.nio.file.Path destZipFile)
Compress files into a .zip file.
|
static void |
decompressTarArchive(java.nio.file.Path tarGzFile,
java.nio.file.Path destinationDir)
Extract a tar.gz archive
|
static void |
gzipFile(java.nio.file.Path baseFile,
java.nio.file.Path newFile) |
static void |
unzip(java.nio.file.Path destinationDir,
java.nio.file.Path zipFile)
Unzip a .zip file to a folder
|
static void |
unzipJar(java.nio.file.Path destinationDir,
java.nio.file.Path jarPath,
java.lang.String... args) |
static void |
unzipJars(ZipUtils.JarPath... jars) |
public static void decompressTarArchive(java.nio.file.Path tarGzFile,
java.nio.file.Path destinationDir)
throws java.io.IOException
tarGzFile - the tar.gz archive to extract.destinationDir - directory to extract the archive.java.io.IOException - if an I/O error occurred.public static void gzipFile(java.nio.file.Path baseFile,
java.nio.file.Path newFile)
throws java.io.IOException
java.io.IOExceptionpublic static void compressFiles(java.nio.file.Path[] listFiles,
java.nio.file.Path destZipFile)
throws java.io.IOException
listFiles - files to compress.destZipFile - destination .zip filejava.io.IOException - if an I/O error occurred.public static void unzip(java.nio.file.Path destinationDir,
java.nio.file.Path zipFile)
throws java.io.IOException
destinationDir - where the zip will be extracted.zipFile - the zip to extract.java.io.IOException - if an I/O error occurred.public static void unzipJar(java.nio.file.Path destinationDir,
java.nio.file.Path jarPath,
java.lang.String... args)
throws java.io.IOException
java.io.IOExceptionpublic static void unzipJars(ZipUtils.JarPath... jars) throws java.io.IOException
java.io.IOException