Home > Contents > Index >
Expanded TOC | Accordion TOC | Annotated TOC | Index
Utilities.validateZip
Validates the integrity of a zip file.
Syntax
public static final boolean validateZip(String zip)Parameters
zip
- The pathname of the zip file to validate.
Returns
Returns
true
if zip file is good,false
if not.Example
Validate and unzip the zip file stored at
c:xx.zip
:
String MyZipFile = "c:xx.zip"; if ( Utilities.validateZip(MyZipFile) ) { // zip file is valid; unzip it into the emp directory String UnzipTarget = "c: emp"; boolean UnzipResult; UnzipResult = Utilities.unzipFile(MyZipFile, UnzipTarget); if (!UnzipResult) { // Problem unzip'ing the zip file. } }See Also
Home > Contents > Index > Oracle JAVA Reference
Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.