Package java.util.jar

Examples of java.util.jar.JarFile.entries()


      if (jar != null) {
        try {
          // System.out.println("jar: " + jar.getAbsolutePath());
          JarFile jarFile = new JarFile(jar);
          Enumeration entries = jarFile.entries();
          ArrayList list = new ArrayList(250);
          while (entries.hasMoreElements()) {
            JarEntry jarEntry = (JarEntry) entries.nextElement();
            if (jarEntry.getName().startsWith(bundleFolder)
                && jarEntry.getName().endsWith(extension)) {
View Full Code Here


        try {
            if (redeployMode) {
                conn.setUseCaches(false);
            }
            jarFile = conn.getJarFile();
            Enumeration entries = jarFile.entries();
            while (entries.hasMoreElements()) {
                JarEntry entry = (JarEntry) entries.nextElement();
                String name = entry.getName();
                if (!name.startsWith("META-INF/")) continue;
                if (!name.endsWith(".tld")) continue;
View Full Code Here

    try {
      // Open the ZIP file
      JarFile zf = new JarFile(getBase());

      // Enumerate each entry
      for (Enumeration<JarEntry> entries = zf.entries(); entries.hasMoreElements();) {
        ZipEntry entry = entries.nextElement();
        mZipFileEntries.put(entry.getName(), entry);
      }
    } catch (IOException e) {
      // If something goes wrong, reset Theme
View Full Code Here

 
      // open jar file
      JarFile jarFile = new JarFile(path + nativeJar, true);
 
      // get list of files in jar
      Enumeration entities = jarFile.entries();
 
      totalSizeExtract = 0;
      int jarNum = i - (urlList.length - nativeJarCount); // used for progressbar
   
      // calculate the size of the files to extract for progress bar
View Full Code Here

      }
 
      currentSizeExtract = 0;
 
      // reset point to begining by getting list of file again
      entities = jarFile.entries();
 
      // extract all files from the jar
      while (entities.hasMoreElements()) {
        JarEntry entry = (JarEntry) entities.nextElement();
 
View Full Code Here

                if (zipFile.getEntry("component.xml") == null) {
                    return;
                }
                dir.mkdir();
                manager.getLog().debug("Extracting component: " + componentName);
                for (Enumeration e=zipFile.entries(); e.hasMoreElements(); ) {
                    JarEntry entry = (JarEntry)e.nextElement();
                    File entryFile = new File(dir, entry.getName());
                    // Ignore any manifest.mf entries.
                    if (entry.getName().toLowerCase().endsWith("manifest.mf")) {
                        continue;
View Full Code Here

  private static void findInJar(List<Class<?>> results, File file, String packageName) {
    JarFile jarFile = null;
    String packagePath = nameToPath(packageName) + "/";
    try {
      jarFile = new JarFile(file);
      Enumeration<JarEntry> en = jarFile.entries();
      while (en.hasMoreElements()) {
        JarEntry je = en.nextElement();
        String name = je.getName();
        if (name.startsWith(packagePath) && name.endsWith(CLASS_FILE)) {
          String className = name.substring(0, name.length() - CLASS_FILE.length());
View Full Code Here

                unzippedDir.mkdirs();
            }

            // 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();
View Full Code Here

     * Iterates through a jar file searching for a class. If found, it returns that classes date
     */
    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

                }
            }
            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) {
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.