@Test @Ignore public void testDeCompress() throws Exception { String file = SysUtil.CURRENT_USER_DIR + "/src/test/java"; String zipFile = TestUtil.path + "temp/test.zip"; ZIPUtil.deCompress(new File(file), zipFile); File file1 = new File(SysUtil.CURRENT_USER_DIR + "/src/test/java/com/opslab/helper/FileHelperTest.java"); ZIPUtil.deCompress(file1, TestUtil.path + "temp/test1.zip"); }
public static void deCompress(File file, String dest) throws IOException { try (ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(dest))) { String dir = ""; if (file.isDirectory()) { dir = file.getName(); } zipFile(file, zos, dir); } catch (IOException e) { throw e; } }
ZIPUtil { public static void deCompress(File file, String dest) throws IOException { try (ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(dest))) { String dir = ""; if (file.isDirectory()) { dir = file.getName(); } zipFile(file, zos, dir); } catch (IOException e) { throw e; } } }
ZIPUtil { public static void deCompress(File file, String dest) throws IOException { try (ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(dest))) { String dir = ""; if (file.isDirectory()) { dir = file.getName(); } zipFile(file, zos, dir); } catch (IOException e) { throw e; } }  }
ZIPUtil { public static void deCompress(File file, String dest) throws IOException { try (ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(dest))) { String dir = ""; if (file.isDirectory()) { dir = file.getName(); } zipFile(file, zos, dir); } catch (IOException e) { throw e; } }  static void deCompress(File file, String dest); static void zipFile(File inFile, ZipOutputStream zos, String dir); static void unCompress(File source, String path); }
ZIPUtil { public static void deCompress(File file, String dest) throws IOException { try (ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(dest))) { String dir = ""; if (file.isDirectory()) { dir = file.getName(); } zipFile(file, zos, dir); } catch (IOException e) { throw e; } }  static void deCompress(File file, String dest); static void zipFile(File inFile, ZipOutputStream zos, String dir); static void unCompress(File source, String path);  }