public final class ZipUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
extractZipEntry(ZipFile zipFile,
ZipEntry target,
File toDirectory)
Extract zip entry.
|
static boolean |
isZip(String filename)
Checks if the given filename is a zip-file.
|
static void |
unzip(ZipFile zipFile,
File toDir)
Unzip.
|
static void |
zip(File fileToZip,
File zipFile)
Zip the given file.
|
static void |
zip(File dirToZip,
File zipFile,
FilenameFilter filter)
Zip the given file.
|
static void |
zip(File dirToZip,
File zipFile,
FilenameFilter filter,
boolean createFile)
Zip the given file.
|
public static void extractZipEntry(ZipFile zipFile, ZipEntry target, File toDirectory) throws IOException
zipFile - the zip filetarget - the targettoDirectory - the to directoryIOException - Signals that an I/O exception has occurred.public static boolean isZip(String filename)
filename - The filename to check.public static void unzip(ZipFile zipFile, File toDir) throws IOException
zipFile - the zip filetoDir - the to dirIOException - Signals that an I/O exception has occurred.public static void zip(File fileToZip, File zipFile) throws Exception
fileToZip - the file to zip.zipFile - the zip fileException - the exceptionpublic static void zip(File dirToZip, File zipFile, FilenameFilter filter)
dirToZip - the dir to zipzipFile - the zip filefilter - the filterpublic static void zip(File dirToZip, File zipFile, FilenameFilter filter, boolean createFile)
dirToZip - the dir to zipzipFile - the zip filefilter - the filtercreateFile - the create fileCopyright © 2007–2015 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.