org.ow2.petals.ant.util
Class ZipUtil

java.lang.Object
  extended by org.ow2.petals.ant.util.ZipUtil

public class ZipUtil
extends java.lang.Object


Nested Class Summary
static interface ZipUtil.ZipEntryCallback
           
 
Constructor Summary
ZipUtil()
           
 
Method Summary
static void addFile(java.util.zip.ZipOutputStream zipOutputStream, java.io.InputStream inputStream, java.lang.String zipEntryName)
          Add a file to a zip stream, without checking if already zipped.
static void addFile(java.util.zip.ZipOutputStream zipOutputStream, java.io.InputStream inputStream, java.lang.String zipEntryName, long zipEntryTime)
          Add a file to a zip stream specifiing zip entry time, without checking if already zipped.
static void copyAndUpdateZipFile(java.util.zip.ZipFile zipInputFile, java.util.zip.ZipOutputStream zipOutputStream, ZipUtil.ZipEntryCallback callback)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZipUtil

public ZipUtil()
Method Detail

addFile

public static final void addFile(java.util.zip.ZipOutputStream zipOutputStream,
                                 java.io.InputStream inputStream,
                                 java.lang.String zipEntryName)
                          throws java.io.IOException
Add a file to a zip stream, without checking if already zipped.

Parameters:
zipOutputStream - OutputStream of the zip file
zipEntryName - Zip entry name of the file to add
Throws:
java.io.IOException

addFile

public static final void addFile(java.util.zip.ZipOutputStream zipOutputStream,
                                 java.io.InputStream inputStream,
                                 java.lang.String zipEntryName,
                                 long zipEntryTime)
                          throws java.io.IOException
Add a file to a zip stream specifiing zip entry time, without checking if already zipped.

Parameters:
zipOutputStream - OutputStream of the zip file
zipEntryName - Zip entry name of the file to add
zipEntryTime - Zip entry time of the file to add
Throws:
java.io.IOException

copyAndUpdateZipFile

public static final void copyAndUpdateZipFile(java.util.zip.ZipFile zipInputFile,
                                              java.util.zip.ZipOutputStream zipOutputStream,
                                              ZipUtil.ZipEntryCallback callback)
                                       throws java.io.IOException,
                                              org.ow2.petals.jbi.descriptor.JBIDescriptorException
Throws:
java.io.IOException
org.ow2.petals.jbi.descriptor.JBIDescriptorException


Copyright © 2005-2011 Petals Link (EBM Websourcing). All Rights Reserved.