Package org.opends.quicksetup.util
Class ZipExtractor
- java.lang.Object
-
- org.opends.quicksetup.util.ZipExtractor
-
public class ZipExtractor extends Object
Class for extracting the contents of a zip file and managing the reporting of progress during extraction.
-
-
Constructor Summary
Constructors Constructor Description ZipExtractor(File zipFile)Creates an instance of an ZipExtractor.ZipExtractor(InputStream in, String zipFileName)Creates an instance of an ZipExtractor.
-
-
-
Constructor Detail
-
ZipExtractor
public ZipExtractor(File zipFile) throws FileNotFoundException, IllegalArgumentException
Creates an instance of an ZipExtractor.- Parameters:
zipFile- File the zip file to extract- Throws:
FileNotFoundException- if the specified file does not existIllegalArgumentException- if the zip file is not a zip file
-
ZipExtractor
public ZipExtractor(InputStream in, String zipFileName) throws FileNotFoundException, IllegalArgumentException
Creates an instance of an ZipExtractor.- Parameters:
in- InputStream for zip contentzipFileName- name of the input zip file- Throws:
FileNotFoundException- if the specified file does not existIllegalArgumentException- if the zip file is not a zip file
-
-
Method Detail
-
extract
public void extract(File destination) throws ApplicationException
Performs the zip extraction.- Parameters:
destination- File where the zip file will be extracted- Throws:
ApplicationException- if something goes wrong
-
-