@Test void testUnzip() { InputStream is = ZipFileUtil.class.getResourceAsStream("emx-csv.zip"); ZipFileUtil.unzip(is, tempDir); Path tempDirPath = tempDir.toPath(); Map<Path, String> checksums = ImmutableMap.of( tempDirPath.resolve("attributes.csv"), "4cc30a6b867ce0689f19bdaadcd30dd9", tempDirPath.resolve("entities.csv"), "8a306d69b8654f54f1e9175ce68b5a6f", tempDirPath.resolve("it_csv_hospital.csv"), "87824a0ec5312a81e4f9fd8ad51b666b", tempDirPath.resolve("it_csv_patients.csv"), "497e36e9b850a5a66f292378c68bce15", tempDirPath.resolve("packages.csv"), "11e879ddd1ebe6376be309acb910d232"); checksums.forEach( (key, value) -> assertEquals(md5Hash(key), value, key + " should have md5 sum " + value)); }
public static void unzip(InputStream is, File outputDir) { try { ZipUtil.unpack(is, outputDir); } catch (Exception ex) { throw new UnzipException(ex); } }
ZipFileUtil { public static void unzip(InputStream is, File outputDir) { try { ZipUtil.unpack(is, outputDir); } catch (Exception ex) { throw new UnzipException(ex); } } }
ZipFileUtil { public static void unzip(InputStream is, File outputDir) { try { ZipUtil.unpack(is, outputDir); } catch (Exception ex) { throw new UnzipException(ex); } } private  ZipFileUtil(); }
ZipFileUtil { public static void unzip(InputStream is, File outputDir) { try { ZipUtil.unpack(is, outputDir); } catch (Exception ex) { throw new UnzipException(ex); } } private  ZipFileUtil(); static void unzip(InputStream is, File outputDir); static List<File> unzipSkipHidden(File file); }
ZipFileUtil { public static void unzip(InputStream is, File outputDir) { try { ZipUtil.unpack(is, outputDir); } catch (Exception ex) { throw new UnzipException(ex); } } private  ZipFileUtil(); static void unzip(InputStream is, File outputDir); static List<File> unzipSkipHidden(File file);  }