public static File unzipToTempFolder(File zipFile){
  String zipFilename=zipFile.getName();
  String tempFolderPrefix=zipFilename.substring(0,zipFilename.lastIndexOf('.'));
  File tempFolder=createTempFolder(tempFolderPrefix);
  try {
    PUZipUtils.unzip(zipFile,tempFolder);
    return tempFolder;
  }
 catch (  Exception e) {
    try {
      FileUtils.deleteFileOrDirectory(tempFolder);
    }
 catch (    RuntimeException ex) {
      logger.debug("Failed to delete folder " + tempFolder,ex);
    }
    throw new RuntimeException("Failed to unzip file " + zipFile + " to "+ tempFolder,e);
  }
}

public static File unzipToTempFolder ( File zipFile ) { String zipFilename = zipFile . getName ( ) ; String tempFolderPrefix = zipFilename . substring ( 0 , zipFilename . lastIndexOf ( '.' ) ) ; File tempFolder = createTempFolder ( tempFolderPrefix ) ; try { PUZipUtils . unzip ( zipFile , tempFolder ) ; return tempFolder ; } catch ( Exception e ) { try { FileUtils . deleteFileOrDirectory ( tempFolder ) ; } catch ( RuntimeException ex ) { logger . debug ( "Failed to delete folder " + tempFolder , ex ) ; } throw new RuntimeException ( "Failed to unzip file " + zipFile + " to " + tempFolder , e ) ; } }
unzips the specified zip file to a temp folder
