Logo Search packages:      
Sourcecode: jamvm version File versions

final Enumeration java::lang::ClassLoader::getResources ( String  name  )  throws IOException [inline]

Returns an Enumeration of all resources with a given name that can be found by this classloader and its parents. Certain classloaders (such as the URLClassLoader when given multiple jar files) can have multiple resources with the same name that come from multiple locations. It can also occur that a parent classloader offers a resource with a certain name and the child classloader also offers a resource with that same name. getResource() only offers the first resource (of the parent) with a given name. This method lists all resources with the same name. The name should use '/' as path separators.

The Enumeration is created by first calling getResources() on the parent classloader and then calling findResources() on this classloader.

name the resource name
an enumaration of all resources found
IOException if I/O errors occur in the process

Definition at line 557 of file ClassLoader.java.

References findResources(), getResources(), and parent.

Referenced by getResources(), and getSystemResources().

    Enumeration parentResources;
    if (parent == null)
      parentResources = VMClassLoader.getResources(name);
      parentResources = parent.getResources(name);
    return new DoubleEnumeration(parentResources, findResources(name));

Generated by  Doxygen 1.6.0   Back to index