public interface ResourceHandler
Modifier and Type | Method and Description |
---|---|
ClassLoader |
classloader()
Returns the classloader used to resolve resources.
|
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.
|
@Nullable URL getResourceAsURL(@Nonnull String name)
The name of a resource is a '/'-separated path name that identifies the resource.
name
- The resource name@Nullable InputStream getResourceAsStream(@Nonnull String name)
name
- The resource name@Nullable List<URL> getResources(@Nonnull String name)
The name of a resource is a /-separated path name that identifies the resource.
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.@Nonnull ClassLoader classloader()