- All Known Implementing Classes:
DefaultResourceManager
public interface ResourceManager
The ResourceManager API.
- Author:
- Manfred Riem ([email protected])
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addResource
(Resource resource) Add the resource.Returns all the locations for this resource manager.getResource
(String location) Get the resource.getResourceAsStream
(String location) Get the resource as a stream.Returns all the locations for this resource manager.getResources
(String location) Get the resources.default boolean
Returns isAlsoTryLoadFromClass.default void
setAlsoTryLoadFromClass
(boolean alsoTryLoadFromClass) Sets the alsoTryLoadFromClass flag
-
Method Details
-
addResource
Add the resource.- Parameters:
resource
- the resource.
-
getResource
Get the resource.- Parameters:
location
- the location.- Returns:
- the URL.
- Throws:
MalformedURLException
- when the location is malformed.
-
getResources
Get the resources.- Parameters:
location
- the location- Returns:
- the URLs.
- Throws:
MalformedURLException
- when the location is malformed.
-
getResourceAsStream
Get the resource as a stream.- Parameters:
location
- the location.- Returns:
- the input stream, or null if not found.
-
getAllLocations
Returns all the locations for this resource manager.- Returns:
- all the locations for this resource manager
-
getResourceList
Returns all the locations for this resource manager.- Returns:
- all the locations for this resource manager
-
isAlsoTryLoadFromClass
default boolean isAlsoTryLoadFromClass()Returns isAlsoTryLoadFromClass.- Returns:
- isAlsoTryLoadFromClass
-
setAlsoTryLoadFromClass
default void setAlsoTryLoadFromClass(boolean alsoTryLoadFromClass) Sets the alsoTryLoadFromClass flag- Parameters:
alsoTryLoadFromClass
- the alsoTryLoadFromClass flag
-