ZipUtils { @SuppressWarnings("unchecked") public static List<File> unzipTo(File zipFile, File destFolder) { List<File> extractedFiles = null; try { Zip64File zip64File = new Zip64File(zipFile); List<FileEntry> entries = zip64File.getListFileEntries(); extractedFiles = new ArrayList<File>(); for (FileEntry fileEntry : entries) { File currentFile = readEntry(zip64File, fileEntry, destFolder); extractedFiles.add(currentFile); } zip64File.close(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return extractedFiles; }  static File createZip(File srcFolder, File destFolder, String zipName, boolean compress); static ZipResult createZipAndCheck(File srcFolder, File destFolder, String zipName, boolean compress); @SuppressWarnings("unchecked") static List<File> unzipTo(File zipFile, File destFolder); static List<File> checkAndUnzipTo(File zipFile, File destFolder, Checksum checksum); static String[] getAllFragments(File zip); static File getFileFrom(File zip, String targetPathInZipfile, File destFolder); static File insertFileInto(File zipFile, File toInsert, String targetPath); static File removeFileFrom(File zipFile, String fileToRemove); @SuppressWarnings("unchecked") static boolean isZipFile(File file); @SuppressWarnings("unchecked") static List<String> listZipEntries(File zip);  }
@Test public void testExtractFilesFromZip() { List<File> files = ZipUtils.unzipTo(zip, extractResultOut); if (files != null) { for (Iterator<File> iterator = files.iterator(); iterator.hasNext();) { File file = iterator.next(); System.out.println("Extracted file name: " + file.getAbsolutePath()); } } }