Package java.util.jar

Examples of java.util.jar.JarInputStream.closeEntry()


            JarEntry e = jarIn.getNextJarEntry();
            while (e != null) {
                if (!e.isDirectory() && e.getName().startsWith(parent) && sl.onAccept(e.getName())) {
                    sl.onProcess(e.getName(), jarIn);
                }
                jarIn.closeEntry();
                e = jarIn.getNextJarEntry();
            }
        } finally {
            if (jarIn != null) {
                jarIn.close();
View Full Code Here


        while ((len = jarInput.read(bytes)) != -1) {
          jarOut.write(bytes, 0, len);
        }
        jarOut.closeEntry();
      }
      jarInput.closeEntry();
    }
    jarOut.close();
    out.close();
    jarInput.close();
View Full Code Here

                                + " of size " + ja.getSize(), e);
                    }
                } finally {
                    // this is here to catch the spurious "java.io.EOFException:Unexpected end of ZLIB input stream"
                    try {
                      jis.closeEntry();
                    } catch (Exception e) {
                      logger.log(Level.FINE, "swallowing error", e);
                    }
                }
            }
View Full Code Here

      }
      File file = new File(dest, fileName);
      if (entry.isDirectory()) {
        // make sure the directory exists
        file.mkdirs();
        jin.closeEntry();
      } else {
        // make sure the directory exists
        File parent = file.getParentFile();
        if (parent != null && !parent.exists()) {
          parent.mkdirs();
View Full Code Here

        while ((len = jin.read(buffer, 0, buffer.length)) != -1) {
          out.write(buffer, 0, len);
        }
        out.flush();
        out.close();
        jin.closeEntry();
        file.setLastModified(entry.getTime());
      }
      entry = jin.getNextEntry();
    }
    /*
 
View Full Code Here

                logger.debug("Zip Entry is [" + zipEntry.getName() + "]");
                if(zipEntry.getName().equals("META-INF/persistence.xml") ){
                    isJpa = true;
                    break;
                }
                zis.closeEntry();
            }
            zis.close();
            if(isJpa){
                dialectName = "jpa";
            } else{
View Full Code Here

                    if (m_phase == Phase.CORRUPT_STREAM && m_nextVersion.equals(version)) {
                        jos.write("garbage".getBytes());
                    }
                }
                jos.closeEntry();
                jis.closeEntry();
            }
            jis.close();
            jos.close();
            if (m_phase == Phase.BUNDLE_WORKS && m_nextVersion.equals(version)) {
                m_latch.countDown();
View Full Code Here

                                jos.write(copyBuf, 0, len);
                            }
                        }
                    }

                    jis.closeEntry();
                    jos.closeEntry();
                }

                // If the file is not found, add it
                if (!found) {
View Full Code Here

        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(outputFile));
        copy(bos, jis);
        bos.flush();
        bos.close();
      }
      jis.closeEntry();
    }
  }

}
View Full Code Here

                        // System.out.println("Found possible test class: '" + className + "'");
                        Class<?> testClass = Class.forName(className);
                        classes.add(testClass);
                    }
                } finally {
                    jarStream.closeEntry();
                }
                jarEntry = jarStream.getNextJarEntry();
            }
        } finally {
            jarStream.close();
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.