Package org.beangle.commons.archiver.zip

Examples of org.beangle.commons.archiver.zip.ZipEntry


    try {
      zf = new ZipFile(zipFile);
      @SuppressWarnings("unchecked")
      Enumeration<ZipEntry> enu = zf.getEntries();
      while (enu.hasMoreElements()) {
        ZipEntry entry = (ZipEntry) enu.nextElement();
        String name = entry.getName();
        String path = dest + name;
        File file = new File(path);
        if (entry.isDirectory()) {
          file.mkdirs();
        } else {
          InputStream is = zf.getInputStream(entry);
          byte[] buf1 = new byte[1024];
          int len;
View Full Code Here


      out.setEncoding(encoding);
      for (int i = 0; i < fileNames.size(); i++) {
        String fileName = fileNames.get(i);
        DataInputStream in = new DataInputStream(new FileInputStream(fileName));
        String entryName = StringUtils.substringAfterLast(fileName, File.separator);
        out.putNextEntry(new ZipEntry(entryName));
        int c;
        while ((c = in.read()) != -1) {
          out.write(c);
        }
        in.close();
View Full Code Here

TOP

Related Classes of org.beangle.commons.archiver.zip.ZipEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.