Package java.util.zip

Examples of java.util.zip.ZipInputStream.closeEntry()


      if(isZip){
        do {
          if (!zipEntry.isDirectory()) {
            writeOutAndDontCloseInputStream(outputDir, zipEntry.getName(), zis);
          }
          zis.closeEntry();
          zipEntry = zis.getNextEntry();
        } while (zipEntry != null);
      }else{
        success=false;
      }
View Full Code Here


        else if (match)
          externalizeFile(fname, zs);
        else
          readFile(fname, zs);

        zs.closeEntry();
      }

      zs.close();
    } catch (IOException e) {
      e.printStackTrace();
View Full Code Here

                            }
                        } finally {
                            IOUtils.flush(out);
                            out.close();
                        }
                        in.closeEntry();
                    }
                }
            }
        } catch (IOException e) {
            FileUtils.recursiveDelete(target);
View Full Code Here

            FileOutputStream fout = new FileOutputStream(
                                        new File(packageDir, entryName.substring(index + 1)));
            for (int c = zin.read(); c != -1; c = zin.read()) {
                fout.write(c);
            }
            zin.closeEntry();
            fout.close();
        }
        zin.close();
    }
   
View Full Code Here

            FileOutputStream fout = new FileOutputStream(
                                        new File(packageDir, entryName.substring(index + 1)));
            for (int c = zin.read(); c != -1; c = zin.read()) {
                fout.write(c);
            }
            zin.closeEntry();
            fout.close();
        }
        zin.close();
    }
   
View Full Code Here

            boolean isLegacySite = false;
            while ((z = zis2.getNextEntry()) != null) {
                if ("site.properties".equals(z.getName())) {
                    Properties p = new Properties();
                    p.load(zis2);
                    zis2.closeEntry();
                    importInfos.putAll(p);

                    importInfos.put("templates", "");
                    if (importInfos.containsKey("templatePackageName")) {
                        JahiaTemplateManagerService templateManager =
View Full Code Here

                    if (ze.isDirectory()) {
                        fo.mkdirs();
                    } else {
                        copyStream(zis, new FileOutputStream(fo));
                    }
                    zis.closeEntry();
                }
            } finally {

                // Important !!!
                zf.close();
View Full Code Here

                            parent.mkdirs();
                            FileOutputStream fos = new FileOutputStream(fo);
                            copyStream(zis, fos);
                        }
                    }
                    zis.closeEntry();
                }
            } finally {

                // Important !!!
                zf.close();
View Full Code Here

            String zeName = null;

            while ( (ze = zis.getNextEntry()) != null &&
                          !ze.getName().equalsIgnoreCase(entryName)) {
                // loop until the requested entry
                zis.closeEntry();
            }

            try {

                if (ze.isDirectory()) {
View Full Code Here

                            FileOutputStream outs = new FileOutputStream(fo);
                            copyStream(zis, outs);
                            //outs.flush();
                            //outs.close();
                        }
                        zis.closeEntry();
                        ze = zis.getNextEntry();

                    }
                } else {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.