public class ArchiveUtils
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
protected |
ArchiveUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
tarGzExtractSingleFile(java.io.File tarGz,
java.io.File destination,
java.lang.String pathInTarGz)
Extract a single file from a tar.gz file.
|
static java.util.List<java.lang.String> |
tarGzListFiles(java.io.File tarGzFile)
List all of the files and directories in the specified tar.gz file
|
protected static java.util.List<java.lang.String> |
tarGzListFiles(java.io.File file,
boolean isTarGz) |
static java.util.List<java.lang.String> |
tarListFiles(java.io.File tarFile)
List all of the files and directories in the specified tar.gz file
|
static void |
unzipFileTo(java.lang.String file,
java.lang.String dest)
Extracts files to the specified destination
|
static void |
zipExtractSingleFile(java.io.File zipFile,
java.io.File destination,
java.lang.String pathInZip)
Extract a single file from a .zip file.
|
static java.util.List<java.lang.String> |
zipListFiles(java.io.File zipFile)
List all of the files and directories in the specified .zip file
|
public static void unzipFileTo(java.lang.String file,
java.lang.String dest)
throws java.io.IOException
file - the file to extract todest - the destination directoryjava.io.IOExceptionpublic static java.util.List<java.lang.String> tarListFiles(java.io.File tarFile)
throws java.io.IOException
tarFile - A .tar filejava.io.IOExceptionpublic static java.util.List<java.lang.String> tarGzListFiles(java.io.File tarGzFile)
throws java.io.IOException
tarGzFile - A tar.gz filejava.io.IOExceptionprotected static java.util.List<java.lang.String> tarGzListFiles(java.io.File file,
boolean isTarGz)
throws java.io.IOException
java.io.IOExceptionpublic static java.util.List<java.lang.String> zipListFiles(java.io.File zipFile)
throws java.io.IOException
zipFile - Zip filejava.io.IOExceptionpublic static void zipExtractSingleFile(java.io.File zipFile,
java.io.File destination,
java.lang.String pathInZip)
throws java.io.IOException
zipFile - Zip file to extract fromdestination - Destination filepathInZip - Path in the zip to extractjava.io.IOException - If exception occurs while reading/writingpublic static void tarGzExtractSingleFile(java.io.File tarGz,
java.io.File destination,
java.lang.String pathInTarGz)
throws java.io.IOException
unzipFileTo(String, String) for batch extraction insteadtarGz - A tar.gz filedestination - The destination file to extract topathInTarGz - The path in the tar.gz file to extractjava.io.IOExceptionCopyright © 2019. All rights reserved.