public abstract class AbstractResourceHandler extends java.lang.Object implements ResourceHandler
ResourceHandler
interface.Constructor and Description |
---|
AbstractResourceHandler() |
Modifier and Type | Method and Description |
---|---|
java.io.InputStream |
getResourceAsStream(java.lang.String name)
Returns an input stream for reading the specified resource.
|
java.net.URL |
getResourceAsURL(java.lang.String name)
Finds the resource with the given name.
|
java.util.List<java.net.URL> |
getResources(java.lang.String name)
Finds all the resources with the given name.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
classloader
@Nullable public java.io.InputStream getResourceAsStream(@Nonnull java.lang.String name)
ResourceHandler
getResourceAsStream
in interface ResourceHandler
name
- The resource name@Nullable public java.net.URL getResourceAsURL(@Nonnull java.lang.String name)
ResourceHandler
The name of a resource is a '/'-separated path name that identifies the resource.
getResourceAsURL
in interface ResourceHandler
name
- The resource name@Nullable public java.util.List<java.net.URL> getResources(@Nonnull java.lang.String name)
ResourceHandler
The name of a resource is a /-separated path name that identifies the resource.
getResources
in interface ResourceHandler
name
- The resource nameURL
objects for
the resource. If no resources could be found, the list
will be empty. Resources that the class loader doesn't have
access to will not be in the list.