Examples of JarEntry


Examples of java.util.jar.JarEntry

                        // get all jar entries that belongs to the help repository
                        Set jarEntries = getJarDirectoryEntries(jarFile, ((JarURLConnection) uc).getEntryName());

                        // extract and copy the jar entries to output directory
                        Iterator it2 = jarEntries.iterator();
                        JarEntry jarEntry;
                        while(it2.hasNext()){
                            jarEntry = (JarEntry)it2.next();
                            try{
                                extractAndCopyJarEntry(jarFile, jarEntry);
                            } catch(IOException e) {
View Full Code Here

Examples of java.util.jar.JarEntry

        Set res = new HashSet();

        if (jarFile != null && jarrepositoryName != null){
            Enumeration entries = jarFile.entries();
            while (entries.hasMoreElements()){
                JarEntry jarEntry = (JarEntry)entries.nextElement();
                String jarEntryName = jarEntry.getName();
 
                if (jarEntryName.startsWith(jarrepositoryName//  get all excepted .class files
                        && !jarEntryName.equals(jarrepositoryName)
                        && !jarEntryName.endsWith(".class")
                ){ 
View Full Code Here

Examples of java.util.jar.JarEntry

            }

            // Iterate through the files
            JarFile warArchive = new JarFile(warfileRef);
            for (Enumeration e = warArchive.entries(); e.hasMoreElements();) {
                JarEntry element = (JarEntry) e.nextElement();
                if (element.isDirectory()) {
                    continue;
                }
                String elemName = element.getName();

                // If archive date is newer than unzipped file, overwrite
                File outFile = new File(unzippedDir, elemName);
                if (outFile.exists() && (outFile.lastModified() > warfileRef.lastModified())) {
                    continue;
View Full Code Here

Examples of java.util.jar.JarEntry

     */
    private Long searchJarPath(String classResourceName, File path)
            throws IOException, InterruptedException {
        JarFile jar = new JarFile(path);
        for (Enumeration e = jar.entries(); e.hasMoreElements() && !interrupted;) {
            JarEntry entry = (JarEntry) e.nextElement();
            if (entry.getName().equals(classResourceName))
                return new Long(path.lastModified());
        }
        return null;
    }
View Full Code Here

Examples of java.util.jar.JarEntry

            JarFile jar;
            try {
                jar = new JarFile(url.getPath());
                Enumeration entries = jar.entries();
                while (entries.hasMoreElements()) {
                    JarEntry entry = (JarEntry)entries.nextElement();
                    if (!entry.isDirectory()
                        && !entry.getName().startsWith("META")
                        && entry.getTime() > timestamp) {
                       
                        timestamp = entry.getTime();
                    }                   
                }
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
View Full Code Here

Examples of java.util.jar.JarEntry

        URLConnection connection = url.openConnection();
        if (connection != null) {
      // disable caches to get the correct data
      connection.setUseCaches(false);
      if (connection instanceof JarURLConnection) {
          JarEntry ent = ((JarURLConnection)connection).getJarEntry();
          if (ent != null) {
        lastModified = ent.getTime();
        if (lastModified == -1) {
            lastModified = 0;
        }
          }
      } else {
View Full Code Here

Examples of java.util.jar.JarEntry

     * IOException to be thrown.
     *
     * @see #getJarEntry
     */
    public Attributes getAttributes() throws IOException {
  JarEntry e = getJarEntry();
  return e != null ? e.getAttributes() : null;
    }
View Full Code Here

Examples of java.util.jar.JarEntry

     * @see #getJarEntry
     */
    public java.security.cert.Certificate[] getCertificates()
   throws IOException
    {
  JarEntry e = getJarEntry();
  return e != null ? e.getCertificates() : null;
    }
View Full Code Here

Examples of java.util.jar.JarEntry

        PluginJAR jar = getPluginThatContains("native/" + lib);
        if (jar == null)
            return null;

        try {
            JarEntry entry = jar.getJarEntry("native/" + lib);

            int index = lib.lastIndexOf('.');
            String suffix = lib.substring(index, lib.length());
            lib = lib.substring(0, index);
            File temporaryDll = File.createTempFile(lib, suffix);
View Full Code Here

Examples of java.util.jar.JarEntry

        PluginJAR jar = getPluginThatContains(resource);

        if (jar != null) {
            // find the entry in the Jar file
            JarEntry entry = jar.getJarEntry(resource);

            stream = jar.getInputStream(entry);
        } else {
            com.valhalla.Logger.debug("Stream was null for " + resource);
        }
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.