Home > Contents > Index >
Utilities.unzipFile
Extracts the files contained in a zip file into a specified folder. .
Syntax
public static final int unzipFile(String zip, String destination)Parameters
zip
- The path and name of the file to unzip.
destination
- The directory where the extracted files are to be stored.
Returns
Returns zero (0) on success, or error code on error.
Description
Call
unzipFile
to extract the specifiedzip
file into the specifieddestination
directory. The unzipFile method automatically callsosSafeSpec
prior to performing the extraction. Prior to callingunzipFile
, your code should first callvalidateZip
.Example
See the example for validateZip .
See Also
Home > Contents > Index > ![]()
Oracle JAVA Reference
Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.