|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.jaulp.file.zip.ZipUtils
public class ZipUtils
The Class ZipUtils provides functionality for ziping and unzipping files.
| Constructor Summary | |
|---|---|
ZipUtils()
|
|
| Method Summary | |
|---|---|
static void |
extractZipEntry(java.util.zip.ZipFile zipFile,
java.util.zip.ZipEntry target,
java.io.File toDirectory)
Extract zip entry. |
static boolean |
isZip(java.lang.String filename)
Checks if the given filename is a zip-file. |
static void |
unzip(java.util.zip.ZipFile zipFile,
java.io.File toDir)
Unzip. |
static void |
zip(java.io.File fileToZip,
java.io.File zipFile)
Zip the given file. |
static void |
zip(java.io.File dirToZip,
java.io.File zipFile,
java.io.FilenameFilter filter)
Zip the given file. |
static void |
zip(java.io.File dirToZip,
java.io.File zipFile,
java.io.FilenameFilter filter,
boolean createFile)
Zip the given file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ZipUtils()
| Method Detail |
|---|
public static void extractZipEntry(java.util.zip.ZipFile zipFile,
java.util.zip.ZipEntry target,
java.io.File toDirectory)
throws java.io.IOException
zipFile - the zip filetarget - the targettoDirectory - the to directory
java.io.IOException - Signals that an I/O exception has occurred.public static boolean isZip(java.lang.String filename)
filename - The filename to check.
public static void unzip(java.util.zip.ZipFile zipFile,
java.io.File toDir)
throws java.io.IOException
zipFile - the zip filetoDir - the to dir
java.io.IOException - Signals that an I/O exception has occurred.
public static void zip(java.io.File fileToZip,
java.io.File zipFile)
throws java.lang.Exception
fileToZip - the file to zip.
java.io.IOException - Signals that an I/O exception has occurred.
java.lang.Exception
public static void zip(java.io.File dirToZip,
java.io.File zipFile,
java.io.FilenameFilter filter)
dirToZip - the dir to zipzipFile - the zip filefilter - the filter
public static void zip(java.io.File dirToZip,
java.io.File zipFile,
java.io.FilenameFilter filter,
boolean createFile)
dirToZip - the dir to zipzipFile - the zip filefilter - the filter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||