Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6259669

RFE: java.util.jar.ZipFile should provide "Enumeration<? extends ZipEntry> getEntries(Pattern p)"

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: 6
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:

      Description

      If I want to search a class name starts with a certain string, the only option I have now is to enumerate all the entries in the jar file and match myself. It is not efficient doing that. It would be very helpful if we could provide a way to scan the jar file for classes I don't know exact name but having a pattern.

      See bug 4908648's evaluation for more details. Actually when the user calls Locale.getAvailableLocales to get all the supported locales in JRE, the Locale code will scan all the jar files in class path to look for class starts with sun.text.resource.LocaleElements_* and get "*" to see what the locale of that resource file associated with. In this case, we don't know exact name of the class, but we know the entry name for those classes starts with a certain pattern.

      ###@###.### 2005-04-21 20:59:15 GMT

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sherman Xueming Shen
                Reporter:
                xlu Xiaobin Lu (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: