|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--org.openorb.util.ZipUtil
This class provides utilities to manage a zip file.
| Method Summary | |
static void |
addZipFileToZip(ZipEntry src_entry,
ZipFile inputZip,
String dst_name,
ZipOutputStream outputZip)
This function adds a zip file entry to another zip. |
static void |
closeZip(ZipHandle handle)
Close a zip file |
static boolean |
containsFile(ZipHandle handle,
String file)
This function tests if a zip contains a file specified as parameter. |
static void |
copy(ZipHandle src,
ZipHandle dst,
String[] no_copy_list)
Make a copy of a zip file. |
static ZipHandle |
createZip(String name)
Create a zip file. |
static byte[] |
getFileContent(ZipHandle handle,
String file)
Extract a file and return its contents. |
static void |
insert(String src_name,
String dst_name,
ZipHandle dest)
This function adds a file to a zip file. |
static ZipHandle |
openZip(String name)
Open a zip file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static ZipHandle createZip(String name)
throws IOException
name - The name for the zip file to create.IOException - When the FileOutputStream can not be created.
public static ZipHandle openZip(String name)
throws IOException
name - The name for the zip file to open.IOException - ????.
public static void closeZip(ZipHandle handle)
throws IOException
handle - The handle of the zip file to create.IOException - When the handle can't be closed.
public static void insert(String src_name,
String dst_name,
ZipHandle dest)
throws IOException
src_name - The name of the source file.dst_name - The name of the destination file.dest - The handle of the zip file into which to insert the file.IOException - When the file can't be inserted into the zip file.
public static void addZipFileToZip(ZipEntry src_entry,
ZipFile inputZip,
String dst_name,
ZipOutputStream outputZip)
throws IOException
src_entry - The entry in the source zip file.inputZip - The source zip file.dst_name - The name in the destination zip file.outputZip - The output stream of the destination zip file.IOException - When the source can't be read or the destination
can't be written.
public static void copy(ZipHandle src,
ZipHandle dst,
String[] no_copy_list)
throws IOException
src - The handle of the source zip file.dst - The handle of the destination zip file.no_copy_list - An array of filenames that should be left out
while copying.IOException - When either the read or the write fails.
public static boolean containsFile(ZipHandle handle,
String file)
handle - The handle of the zip file to be tested.file - The file to check the zip file for.
public static byte[] getFileContent(ZipHandle handle,
String file)
handle - The handle of the zip file.file - The file to extract.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||