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

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

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 6
    • core-libs

      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

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: