public final class ZipUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
deleteDirAndUnzip(ZipInputStream zis,
File outputDir)
Delete a directory and unzip to that directory.
|
static void |
unzip(ZipInputStream zis,
File outputDir)
Unzip all Zipfile contents to a directory.
|
static void |
unzip(ZipInputStream zis,
String zipEntryName,
File outputDir)
Unzip Zipfile contents matching zipEntryName to a directory.
|
static void |
zipFolder(File inFolder,
File destinationFile)
Zip up a directory and store it into a zip file.
|
public static final void zipFolder(File inFolder, File destinationFile) throws IOException
inFolder - the Folder to zip updestinationFile - the archive file that you would like to createIOException - If unable to read files from the inFolder or write to the destinationFilepublic static void unzip(ZipInputStream zis, File outputDir) throws IOException
zis - the stream of the zipFile to extract artifacts fromoutputDir - the location to put the artifacts from the zipfileIOException - if unable to read from the zip streampublic static void unzip(ZipInputStream zis, String zipEntryName, File outputDir) throws IOException
zis - the stream of the zipFile to extract artifacts fromzipEntryName - the name of the file within the zip to extractoutputDir - the location to put the artifacts from the zipfileIOException - if unable to read from the zip streampublic static void deleteDirAndUnzip(ZipInputStream zis, File outputDir) throws IOException
zis - the zipstream to unzipoutputDir - the output directory to delete and then write toIOException - if unable to delete the directory or unzip the fileCopyright © 2015. All Rights Reserved.