Package com.atlassian.confluence.util
Class ZipUtility
- java.lang.Object
-
- com.atlassian.confluence.util.ZipUtility
-
public class ZipUtility extends Object
Copied from Fisheye com.cenqua.fisheye.util.Zipper User: pkamal Date: Oct 16, 2009 Time: 1:46:08 PM To change this template use File | Settings | File Templates.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ZipUtility.FileHandler
Callback that allows to transform/exchange the file to be added to the zip file.
-
Constructor Summary
Constructors Constructor Description ZipUtility()
ZipUtility(ZipUtility.FileHandler fileHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(String pathInZip, File file)
Adds a file with a corresponding path to use in the actual zip archive.void
zip(OutputStream destination)
Zip the files to the given destination.
-
-
-
Constructor Detail
-
ZipUtility
public ZipUtility()
-
ZipUtility
public ZipUtility(ZipUtility.FileHandler fileHandler)
-
-
Method Detail
-
add
public void add(String pathInZip, File file)
Adds a file with a corresponding path to use in the actual zip archive.- Parameters:
pathInZip
-file
-
-
zip
public void zip(OutputStream destination) throws IOException
Zip the files to the given destination.- Parameters:
destination
- the place to zip the files to- Throws:
IOException
-
-