public abstract class AbstractResourceHandler extends Object implements ResourceHandler
ResourceHandler
interface.Constructor and Description |
---|
AbstractResourceHandler() |
Modifier and Type | Method and Description |
---|---|
InputStream |
getResourceAsStream(String name)
Returns an input stream for reading the specified resource.
|
URL |
getResourceAsURL(String name)
Finds the resource with the given name.
|
List<URL> |
getResources(String name)
Finds all the resources with the given name.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
classloader
@Nullable public InputStream getResourceAsStream(@Nonnull String name)
ResourceHandler
getResourceAsStream
in interface ResourceHandler
name
- The resource name@Nullable public URL getResourceAsURL(@Nonnull 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 List<URL> getResources(@Nonnull 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.