Package java.util.zip

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


            }
        } catch (IOException ex) {
            Logger.logError("Error while extracting zip", ex);
        } finally {
            try {
                zis.closeEntry();
                zis.close();
            } catch (IOException e) {
            }
        }
    }
View Full Code Here


        ZipEntry entry=zipFile.getNextEntry();
        while(entry!=null) {
            if(entry.getName().endsWith("/metadataContext.xml"))
                return zipFile;

            zipFile.closeEntry();
            entry=zipFile.getNextEntry();
        }

        return null;
    }
View Full Code Here

        while (true) {
            ZipEntry entry = zis.getNextEntry();
            if (entry == null)
                break;
            callback.run(zis, entry);
            zis.closeEntry();
        }
        zis.close();
    }

    boolean needRecompile() throws IOException {
View Full Code Here

ZipEntry inEnt;
while ((inEnt = in.getNextEntry()) != null) {
  ZipEntry outEnt = new ZipEntry(inEnt); // copy size, modification time etc.
  byte[] data = new byte[(int)inEnt.getSize()];
  in.read(data); // read data for this old entry
  in.closeEntry();
  out.putNextEntry(outEnt);
  out.write(data); // copy it to the new entry
  out.closeEntry();
}
in.close();
View Full Code Here

// copy the files from the old JAR to the new, but don't close the new JAR yet
while ((inEnt = in.getNextEntry()) != null) {
  ZipEntry outEnt = new ZipEntry(inEnt); // copy size, modification time etc.
  byte[] data = new byte[(int)inEnt.getSize()];
  in.read(data); // read data for this old entry
  in.closeEntry();
try{
    out.putNextEntry(outEnt);
    out.write(data); // copy it to the new entry
    out.closeEntry();
}
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

   
    while ((entry = zis.getNextEntry()) != null) {
      logger.info("Unzipping: " + entry.getName());
      ObjectInputStream in = new ObjectInputStream(zis);
      classifiers.put(entry.getName(),(Classifier)in.readObject());
      zis.closeEntry();
    }

    zis.close();
    fis.close();
   
View Full Code Here

      baos.write(b);
        }
        baos.close();
        jarEntries.put(entry.getName(), baos.toByteArray());
    }
    zin.closeEntry();
      }
     
      if (!tldFound)
    throw new JasperException(Constants.getString("jsp.error.tld_not_found",
                    new Object[] {
View Full Code Here

                    DocumentBuilder builder = factory.newDocumentBuilder();
                    doc = builder.parse(in);
                    in.close();
                    in = null;
                    break;
                } else in.closeEntry();
            }
        } catch (ParserConfigurationException e) {
            log.error("Unable to read META-INF/ra.xml in RAR file '"+data.getRaURI()+"'", e);
        } catch (SAXException e) {
            log.error("Unable to read META-INF/ra.xml in RAR file '"+data.getRaURI()+"'", e);
View Full Code Here

                            }
                        } finally {
                            IOUtil.flush(out);
                            out.close();
                        }
                        in.closeEntry();
                    }
                }
            }
        } catch (IOException e) {
            IOUtil.recursiveDelete(target);
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.