|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nih.nci.cagrid.common.ZipUtilities
public class ZipUtilities
ZipUtilities Utilities to maniuplate zip files
| Constructor Summary | |
|---|---|
ZipUtilities()
|
|
| Method Summary | |
|---|---|
static byte[] |
extractEntryContents(java.io.File zipFile,
java.lang.String entryName)
Extracts the contents of a zip file entry to a byte array |
static void |
insertEntry(java.io.File zipFile,
java.lang.String entryName,
byte[] data)
Inserts an entry in a Zip file. |
static void |
unzip(java.io.File zip,
java.io.File location)
Unzips a zip compressed file to a specific directory |
static void |
unzipInPlace(java.io.File zip)
Unzips a zip compressed file in the directory it resides in |
static void |
zipDirectory(java.io.File dir,
java.io.File zipFile)
Applies zip compression to a directory and all its contents |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ZipUtilities()
| Method Detail |
|---|
public static void unzip(java.io.File zip,
java.io.File location)
throws java.io.IOException
zip - The zip compressed filelocation - The location to unzip into
java.io.IOException
public static void unzipInPlace(java.io.File zip)
throws java.io.IOException
zip - The zip compressed file
java.io.IOException
public static void zipDirectory(java.io.File dir,
java.io.File zipFile)
throws java.io.IOException
dir - The directory to compresszipFile - The file to create the zip archive in
java.io.IOException
public static byte[] extractEntryContents(java.io.File zipFile,
java.lang.String entryName)
throws java.io.IOException
zipFile - The zip fileentryName - The name of the entry to extract
java.io.IOException
public static void insertEntry(java.io.File zipFile,
java.lang.String entryName,
byte[] data)
throws java.io.IOException
zipFile - The zip file to be appendedentryName - The name of the new entrydata - The data to add to the zip
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||