Examples of entries()


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

                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

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

     * 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

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

                }
            }
            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

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

     */
    private InputStream getConnectorXmlInputStream(File file) {
        try {
            if (isJarFile(file)) {
                JarFile jar = new JarFile(file);
                Enumeration e = jar.entries();
                JarEntry entry;
                while (e.hasMoreElements()) {
                    entry = (JarEntry) e.nextElement();
                    if ((!entry.isDirectory()) &&
                            (entry.getName().endsWith(CONNECTOR_XML))) {
View Full Code Here

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

                - resourceName.length() - 2);
            if (filename.startsWith("file:")) {
              filename = filename.substring(5);
            }
            JarFile jar = new JarFile(filename);
            for (Enumeration<JarEntry> entries = jar.entries(); entries
                .hasMoreElements();) {
              JarEntry entry = entries.nextElement();
              String name = entry.getName();
              addMatch("", baseName, bundleNames, baseFileName,
                  name);
View Full Code Here

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

        }
       
      } else if (sourceFile.getName().endsWith(".jar")) {
        JarFile jar;
        jar = new JarFile(sourceFile);
        Enumeration<JarEntry> jarEntries = jar.entries();
        // Check in all jars - maybe we have static resources in custom jars
        // as well (not only in core)
        while (jarEntries.hasMoreElements()) {
          JarEntry jarEntry = jarEntries.nextElement();
          String jarEntryName = jarEntry.getName();
View Full Code Here

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

        for (File jarFile : jarFiles) {
          // check in all jars - don't know the name of the brasato jar
          JarFile jar;
          try {
            jar = new JarFile(jarFile);
            Enumeration<JarEntry> jarEntries = jar.entries();
            while (jarEntries.hasMoreElements()) {
              JarEntry jarEntry = jarEntries.nextElement();
              String jarEntryName = jarEntry.getName();
              // search for core util in jar
              if (jarEntryName.indexOf(I18N_DIRNAME + "/" + I18nModule.LOCAL_STRINGS_FILE_PREFIX) != -1) {
View Full Code Here

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

  public Set<String> sarchForAvailableLanguagesInJarFile(File jarFile, boolean checkForExecutables) {
    Set<String> foundLanguages = new TreeSet<String>();
    JarFile jar;
    try {
      jar = new JarFile(jarFile);
      Enumeration<JarEntry> jarEntries = jar.entries();
      while (jarEntries.hasMoreElements()) {
        JarEntry jarEntry = jarEntries.nextElement();
        String jarEntryName = jarEntry.getName();
        // check for executables
        if (checkForExecutables && (jarEntryName.endsWith("java") || jarEntryName.endsWith("class"))) { return new TreeSet<String>(); }
View Full Code Here

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

      throw new AssertException("Programming error - can only copy i18n files from a language pack to the source when in translation mode");
    }
    JarFile jar;
    try {
      jar = new JarFile(jarFile);
      Enumeration<JarEntry> jarEntries = jar.entries();
      while (jarEntries.hasMoreElements()) {
        JarEntry jarEntry = jarEntries.nextElement();
        String jarEntryName = jarEntry.getName();
        // Check if this entry is a language file
        for (String i18nKey : toCopyI18nKeys) {
View Full Code Here

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

   static void generateJarSerialVersionUIDs(URL jar, TreeMap classVersionMap,
      ClassLoader cl, String pkgPrefix) throws IOException
   {
      String jarName = jar.getFile();
      JarFile jf = new JarFile(jarName);
      Enumeration entries = jf.entries();
      while( entries.hasMoreElements() )
      {
         JarEntry entry = (JarEntry) entries.nextElement();
         String name = entry.getName();
         if( name.endsWith(".class") && name.startsWith(pkgPrefix) )
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.