org.openorb.util
Class ZipUtil

java.lang.Object
  |
  +--org.openorb.util.ZipUtil

public class ZipUtil
extends java.lang.Object

This class provides utilities to manage a ZIP file.

Version:
$Revision: 1.1 $ $Date: 2000/12/28 22:52:47 $
Author:
Jerome Daniel <daniel@intalio.com>

Constructor Summary
ZipUtil()
           
 
Method Summary
static void addZipFileToZip(java.util.zip.ZipEntry src_entry, java.util.zip.ZipFile inputZip, java.lang.String dst_name, java.util.zip.ZipOutputStream outputZip)
          This function adds a Zip File to another Zip
static void CloseZip(ZipHandle handle)
          Close a zip file
static boolean containsFile(ZipHandle handle, java.lang.String file)
          This function tests if a Zip contains a file specified as parameter
static void copy(ZipHandle src, ZipHandle dst, java.lang.String[] no_copy_list)
          Make a Zip copy
static ZipHandle CreateZip(java.lang.String name)
          Create a Zip file
static byte[] getFileContent(ZipHandle handle, java.lang.String file)
          Extract a file and return its content
static void insert(java.lang.String src_name, java.lang.String dst_name, ZipHandle dest)
          This function adds a file to a Zip file
static ZipHandle OpenZip(java.lang.String name)
          Open a zip file
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZipUtil

public ZipUtil()
Method Detail

CreateZip

public static ZipHandle CreateZip(java.lang.String name)
                           throws java.io.IOException
Create a Zip file

OpenZip

public static ZipHandle OpenZip(java.lang.String name)
                         throws java.io.IOException
Open a zip file

CloseZip

public static void CloseZip(ZipHandle handle)
                     throws java.io.IOException
Close a zip file

insert

public static void insert(java.lang.String src_name,
                          java.lang.String dst_name,
                          ZipHandle dest)
                   throws java.io.IOException
This function adds a file to a Zip file

addZipFileToZip

public static void addZipFileToZip(java.util.zip.ZipEntry src_entry,
                                   java.util.zip.ZipFile inputZip,
                                   java.lang.String dst_name,
                                   java.util.zip.ZipOutputStream outputZip)
                            throws java.io.IOException
This function adds a Zip File to another Zip

copy

public static void copy(ZipHandle src,
                        ZipHandle dst,
                        java.lang.String[] no_copy_list)
                 throws java.io.IOException
Make a Zip copy

containsFile

public static boolean containsFile(ZipHandle handle,
                                   java.lang.String file)
This function tests if a Zip contains a file specified as parameter

getFileContent

public static byte[] getFileContent(ZipHandle handle,
                                    java.lang.String file)
Extract a file and return its content