public class ZipWriter extends Object
Constructor and Description |
---|
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) |
Modifier and Type | Method and Description |
---|---|
void |
excludeDirs(String[] dirs)
Exclude any files that are under these directories.
|
void |
excludeDirsAnywhere(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() |
public ZipWriter(String zipFilename, String dirName) throws ZipFileException
ZipFileException
public ZipWriter(String zipFilename, String dirName, ZipItem[] theItems) throws ZipFileException
ZipFileException
public ZipWriter(String zipFilename, String dirName, String[] fileList) throws ZipFileException
ZipFileException
public ZipWriter(OutputStream outStream, String dirName, String[] fileList) throws ZipFileException
ZipFileException
public void excludeDirs(String[] dirs)
dirs
- an array of top-level directory namespublic void excludeDirsAnywhere(String[] dirs)
dirs
- an array of directory namespublic void safeWrite() throws ZipFileException
ZipFileException
- if an error while creating the archivepublic void write() throws ZipFileException
ZipFileException
public static void main(String[] args)
Copyright © 2018. All rights reserved.