logback-android/src/main/java/ch/qos/logback/core/util/Loader.java
public static Set<URL> getResourceOccurrenceCount(String resource,
                                                    ClassLoader classLoader) throws IOException {
    // See LBCLASSIC-159
    Set<URL> urlSet = new HashSet<URL>();
    Enumeration<URL> urlEnum = classLoader.getResources(resource);
    while (urlEnum.hasMoreElements()) {
      URL url = urlEnum.nextElement();
      urlSet.add(url);
    }
    return urlSet;
  }
public static Set<URL> getResourceOccurrenceCount(String resource,
                                                    ClassLoader classLoader) throws IOException {
    // See LBCLASSIC-159
    Set<URL> urlSet = new HashSet<URL>();
    Enumeration<URL> urlEnum = classLoader.getResources(resource);
    while (urlEnum.hasMoreElements()) {
      URL url = urlEnum.nextElement();
      urlSet.add(url);
    }
    return urlSet;
  }
Compute the number of occurrences a resource can be found by a class
loader.

@param resource the resource name to look for
@param classLoader the classloader used for the search
@return matching resource URLs
@throws IOException