public abstract class ZipFileUtils extends Object
| Constructor and Description |
|---|
ZipFileUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addFile(File zipFile,
File addFile)
Add File to Zip File
|
static byte[] |
readEntryAsByteArray(ZipFile file,
ZipEntry ze)
Read a Zip Entry as byte[]
|
static void |
unzip(ZipFile file,
String dirname)
Unzip file to dirname
|
static void |
zip(File[] files,
String zipFilename)
Create a zip file with files
|
static void |
zip(File file,
String zipFilename)
Create a zip file from zipFileName
|
public static void unzip(ZipFile file, String dirname)
file - file to unzipdirname - dir name to store unzipped entriespublic static void zip(File file, String zipFilename) throws Exception
file - to compresszipFilename - to createException - if failpublic static void zip(File[] files, String zipFilename) throws Exception
files - to compresszipFilename - zip file to createException - if failpublic static void addFile(File zipFile, File addFile) throws Exception
zipFile - to add onaddFile - file to addException - if failpublic static byte[] readEntryAsByteArray(ZipFile file, ZipEntry ze) throws IOException
file - zip fileze - zip entryIOException - if failCopyright © 2014 JDAL. All Rights Reserved.