org.deegree.framework.util
Class ZipUtils
java.lang.Object
org.deegree.framework.util.ZipUtils
public class ZipUtils
- extends Object
- Version:
- $Revision: 29950 $, $Date: 2011-03-09 13:09:31 +0100 (Wed, 09 Mar 2011) $
- Author:
- Andreas Poth, last edited by: $Author: apoth $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ZipUtils
public ZipUtils()
doZip
public String doZip(String dirName,
String archiveName,
String[] fileNames,
boolean deleteFiles,
boolean storeFolderPathInZip)
throws FileNotFoundException,
IOException
- packs the passed files into a zip-archive, deletes the files if desired and returns the name
of the archive as absolute path
- Parameters:
dirName
- name of the directory where the files are found (see fileNames) and where the
archive will be stored. Needs to be an absolute path.archiveName
- desired name of the archive. It will be stored in the directory given in dirName.fileNames
- names of the files to be packed into the zip archive. The files are expected to be
in the directory given in dirName.deleteFiles
- if true all files will be deleted after zip-file has been createdstoreFolderPathInZip
- if true, the files are stored in the zip according to their folder structur (with
absolute paths); if false, the files are stored under their file name only.
- Returns:
- the name of the zip file (combined dirName and archiveName)
- Throws:
FileNotFoundException
IOException
getZipDetails
public String getZipDetails()
- Returns:
- details about the zipping
doUnzip
public void doUnzip(File file,
String outdir)
throws IOException
- Parameters:
file
- outdir
-
- Throws:
IOException
doUnzip
public void doUnzip(InputStream is,
String outdir)
throws IOException
- Parameters:
is
- outdir
-
- Throws:
IOException
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org