public class ZipUtility extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
ZipUtility.FileHandler
Callback that allows to transform/exchange the file to be added to the zip file.
|
Constructor and Description |
---|
ZipUtility() |
ZipUtility(ZipUtility.FileHandler fileHandler) |
Modifier and Type | Method and 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.
|
public ZipUtility()
public ZipUtility(ZipUtility.FileHandler fileHandler)
public void add(String pathInZip, File file)
pathInZip
- file
- public void zip(OutputStream destination) throws IOException
destination
- the place to zip the files toIOException
Copyright © 2003–2016 Atlassian. All rights reserved.