Package java.util.jar

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


                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


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

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

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

            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

                    break;
                }
                if (validateName(entry.getName())) {
                    compareClass(jar);
                }
                jar.closeEntry();
            }
        }
        return new ArrayList<>(packageMap.values());
    }
View Full Code Here

                }
            }
            byte[] bytes = new byte[offset];
            System.arraycopy(hbytes, 0, bytes, 0, offset);
            _resourceMap.put(name, bytes);
            jis.closeEntry();
        }
    }

    @Override
    public Class findClass(String className) throws ClassNotFoundException {
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 (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

                            getLog().error( e );
                        }
                    }
                }

                jarStream.closeEntry();
                jarEntry = jarStream.getNextJarEntry();
            }
        }
        catch ( IOException e )
        {
View Full Code Here

      JarInputStream inputStream = new JarInputStream(getData().getInputStream(
          ResourceAccess.ONCE));
      try {
        java.util.jar.JarEntry entry = inputStream.getNextJarEntry();
        while (entry != null) {
          inputStream.closeEntry();
          JarEntry jarEntry = getJarEntry(entry.getName());
          if (jarEntry != null) {
            jarEntry.setupCertificates(entry);
          }
          entry = inputStream.getNextJarEntry();
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.