Package java.util.jar

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


  jo.write(ba, 0, ba.length);

  // copy the remaining entries, discarding the old preferred list
  while ((entry = ji.getNextJarEntry()) != null) {
      if (entry.getName().equals("META-INF/PREFERRED.LIST")) {
    ji.closeEntry();
    continue;
      }
      jo.putNextEntry(entry);
      ba = new byte[1000];
      int size;
View Full Code Here


                    String name = jarEntry.getName().substring( 0, jarEntry.getName().indexOf( "." ) );

                    classes.add( name.replaceAll( "/", "\\." ) );
                }

                jarStream.closeEntry();
                jarEntry = jarStream.getNextJarEntry();
            }
        }
        finally
        {
View Full Code Here

            try {
              inner = new JarInputStream(jarIS);
              readJarStream(repositoryItems, "jar:jar" + root + JarJar.SEPARATOR + entry.getName(), inner);
            } finally {
              if (inner != null) {
                inner.closeEntry();               
              }
            }
          } else {
            createItem(repositoryItems, new URL(root + "!/"), entry);
          }
View Full Code Here

                    } finally {
                        SVNFileUtil.closeFile(fos);
                        SVNFileUtil.closeFile(fis);
                    }
                }
                jis.closeEntry();
            }
        } catch (IOException e) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "Can not extract repository files from ''{0}'' to ''{1}''",
                    new Object[] {srcFile, dst});
            err.setChildErrorMessage(SVNErrorMessage.create(SVNErrorCode.IO_ERROR, e.getLocalizedMessage()));
View Full Code Here

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

            {
               out.write(buffer, 0, len);
            }
            out.flush();
            out.close();
            jin.closeEntry();
            file.setLastModified(entry.getTime());
         }
         entry = jin.getNextEntry();
      }
      /* Explicity write out the META-INF/MANIFEST.MF so that any headers such
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

      {
        if (!e.isDirectory() && e.getName().startsWith(parent))
        {
          checkForMatchingClass(toNativePath(e.getName()));
        }
        jarIn.closeEntry();
      }
    }
    finally
    {
      if (jarIn != null)
View Full Code Here

            byte[] buffer = new byte[4096];
            for (int i = jarInputStream.read(buffer); i > -1; i = jarInputStream.read(buffer)) {
                size += i;
            }
            System.out.println("read JAR entry: " + entry + " of " + size + " bytes.");
            jarInputStream.closeEntry();
        }
        stream.close();
       
        // create references to the unpacked dummy files
        File d1 = new File(dir, dummy1);
View Full Code Here

                if (!z.getName().startsWith("org/osgi")) {
                    destJar.putNextEntry(z);

                    copyJarEntryData(sourceJar, destJar);
                } else {
                    sourceJar.closeEntry();
                }

                z = sourceJar.getNextEntry();
            }
        } catch (final FileNotFoundException e) {
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.