public class ZipExtractor extends Object
| Constructor and Description |
|---|
ZipExtractor(File zipFile)
Creates an instance of an ZipExtractor.
|
ZipExtractor(File zipFile,
int minRatio,
int maxRatio,
int numberZipEntries,
Application app)
Creates an instance of an ZipExtractor.
|
ZipExtractor(InputStream is,
int minRatio,
int maxRatio,
int numberZipEntries,
String zipFileName,
Application app)
Creates an instance of an ZipExtractor.
|
ZipExtractor(InputStream in,
String zipFileName)
Creates an instance of an ZipExtractor.
|
public ZipExtractor(File zipFile) throws FileNotFoundException, IllegalArgumentException
zipFile - File the zip file to extractFileNotFoundException - if the specified file does not existIllegalArgumentException - if the zip file is not a zip filepublic ZipExtractor(InputStream in, String zipFileName) throws FileNotFoundException, IllegalArgumentException
in - InputStream for zip contentzipFileName - name of the input zip fileFileNotFoundException - if the specified file does not existIllegalArgumentException - if the zip file is not a zip filepublic ZipExtractor(File zipFile, int minRatio, int maxRatio, int numberZipEntries, Application app) throws FileNotFoundException, IllegalArgumentException
zipFile - File the zip file to extractminRatio - int indicating the max rationmaxRatio - int indicating the min rationnumberZipEntries - number of entries in the input streamapp - application to be notified about progressFileNotFoundException - if the specified file does not existIllegalArgumentException - if the zip file is not a zip filepublic ZipExtractor(InputStream is, int minRatio, int maxRatio, int numberZipEntries, String zipFileName, Application app)
is - InputStream of zip file contentminRatio - int indicating the max rationmaxRatio - int indicating the min rationnumberZipEntries - number of entries in the input streamzipFileName - name of the input zip fileapp - application to be notified about progresspublic void extract(File destination) throws ApplicationException
destination - File where the zip file will be extractedApplicationException - if something goes wrongpublic void extract(String destination) throws ApplicationException
destination - File where the zip file will be extractedApplicationException - if something goes wrongpublic void extract(String destDir, boolean removeFirstPath) throws ApplicationException
destDir - String representing the directory where the zip file will
be extractedremoveFirstPath - when true removes each zip entry's initial path
when copied to the destination folder. So for instance if the zip entry's
name was /OpenDJ-2.4.x/some_file the file would appear in the destination
directory as 'some_file'.ApplicationException - if something goes wrongCopyright © 2010-2015 ForgeRock AS. All Rights Reserved.