com.sun.enterprise.util.zip
Class ZipWriter
java.lang.Object
com.sun.enterprise.util.zip.ZipWriter
public class ZipWriter
- extends java.lang.Object
|
Constructor Summary |
ZipWriter(java.io.OutputStream outStream,
java.lang.String dirName,
java.lang.String[] fileList)
|
ZipWriter(java.lang.String zipFilename,
java.lang.String dirName)
|
ZipWriter(java.lang.String zipFilename,
java.lang.String dirName,
java.lang.String[] fileList)
|
ZipWriter(java.lang.String zipFilename,
java.lang.String dirName,
ZipItem[] theItems)
|
|
Method Summary |
void |
excludeDirs(java.lang.String[] dirs)
Exclude any files that are under these directories. |
static void |
main(java.lang.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 |
ZipWriter
public ZipWriter(java.lang.String zipFilename,
java.lang.String dirName)
throws ZipFileException
- Throws:
ZipFileException
ZipWriter
public ZipWriter(java.lang.String zipFilename,
java.lang.String dirName,
ZipItem[] theItems)
throws ZipFileException
- Throws:
ZipFileException
ZipWriter
public ZipWriter(java.lang.String zipFilename,
java.lang.String dirName,
java.lang.String[] fileList)
throws ZipFileException
- Throws:
ZipFileException
ZipWriter
public ZipWriter(java.io.OutputStream outStream,
java.lang.String dirName,
java.lang.String[] fileList)
throws ZipFileException
- Throws:
ZipFileException
excludeDirs
public void excludeDirs(java.lang.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(java.lang.String[] args)
Copyright © 2012 GlassFish Community. All Rights Reserved.