public class ZipFileCreator
extends java.lang.Object
Constructor and Description |
---|
ZipFileCreator() |
Modifier and Type | Method and Description |
---|---|
static ZipFileCreator |
create() |
boolean |
preserveBaseFolder()
Returns true if all files should be put under the base folder name in the zip file.
|
ZipFileCreator |
setPreserveBaseFolder(boolean preserveBaseFolder)
Sets whether or not all files should be put under the base folder name in the zip file.
|
long |
zipAllInto(java.lang.String startFolder,
java.io.File zipFile)
Create (or overwrite) the zip file and put all file under the specified start folder
and its sub-folders into it.
|
public static ZipFileCreator create()
public long zipAllInto(java.lang.String startFolder, java.io.File zipFile)
startFolder
- The folder from where to start recursive file processing (must not be null).zipFile
- The target zip file (must not be null).IORuntimeException
- in any case of error.public boolean preserveBaseFolder()
public ZipFileCreator setPreserveBaseFolder(boolean preserveBaseFolder)