com.sun.enterprise.util.zip
Class ZipWriter

java.lang.Object
  extended by com.sun.enterprise.util.zip.ZipWriter

public class ZipWriter
extends Object


Constructor Summary
ZipWriter(OutputStream outStream, String dirName, String[] fileList)
           
ZipWriter(String zipFilename, String dirName)
           
ZipWriter(String zipFilename, String dirName, String[] fileList)
           
ZipWriter(String zipFilename, String dirName, ZipItem[] theItems)
           
 
Method Summary
 void excludeDirs(String[] dirs)
          Exclude any files that are under these directories.
static void main(String[] args)
           
 void safeWrite()
          Does not throw an exception when there is a duplicate zip entry.
 void write()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZipWriter

public ZipWriter(String zipFilename,
                 String dirName)
          throws ZipFileException
Throws:
ZipFileException

ZipWriter

public ZipWriter(String zipFilename,
                 String dirName,
                 ZipItem[] theItems)
          throws ZipFileException
Throws:
ZipFileException

ZipWriter

public ZipWriter(String zipFilename,
                 String dirName,
                 String[] fileList)
          throws ZipFileException
Throws:
ZipFileException

ZipWriter

public ZipWriter(OutputStream outStream,
                 String dirName,
                 String[] fileList)
          throws ZipFileException
Throws:
ZipFileException
Method Detail

excludeDirs

public void excludeDirs(String[] dirs)
Exclude any files that are under these directories. E.g. suppose you have C:/temp/x1, C:/temp/x2 and C:/temp/x3 and the root is set to c:temp. Thhen to exclude the contents of the second 2 dirs you would send in a String array with "x2" and "x3"

Parameters:
dirs - an array of top-level directory names

safeWrite

public void safeWrite()
               throws ZipFileException
Does not throw an exception when there is a duplicate zip entry.

Throws:
ZipFileException - if an error while creating the archive

write

public void write()
           throws ZipFileException
Throws:
ZipFileException

main

public static void main(String[] args)


Copyright © 2012 GlassFish Community. All Rights Reserved.