public class ZipUtility extends Object
| Constructor and Description |
|---|
ZipUtility() |
| Modifier and Type | Method and Description |
|---|---|
void |
zip(List<File> listFiles,
String destZipFile)
Compresses a list of files to a destination zip file
|
void |
zip(String[] files,
String destZipFile)
Compresses files represented in an array of paths
|
public void zip(List<File> listFiles, String destZipFile) throws FileNotFoundException, IOException
listFiles - A collection of files and directoriesdestZipFile - The path of the destination zip fileFileNotFoundExceptionIOExceptionpublic void zip(String[] files, String destZipFile) throws FileNotFoundException, IOException
files - a String array containing file pathsdestZipFile - The path of the destination zip fileFileNotFoundExceptionIOExceptionCopyright © 2016–2020. All rights reserved.