public class DefaultResourceManager extends Object implements ResourceManager
Constructor and Description |
---|
DefaultResourceManager() |
Modifier and Type | Method and Description |
---|---|
void |
addResource(Resource resource)
Add resource.
|
Stream<String> |
getAllLocations() |
URL |
getResource(String location)
Get the resource URL.
|
InputStream |
getResourceAsStream(String location)
Get the resource as a stream.
|
Collection<URL> |
getResources(String location)
Get the resources.
|
public void addResource(Resource resource)
addResource
in interface ResourceManager
resource
- the resource.public URL getResource(String location) throws MalformedURLException
getResource
in interface ResourceManager
location
- the location.MalformedURLException
- when the location URL is malformed.public Collection<URL> getResources(String location) throws MalformedURLException
getResources
in interface ResourceManager
location
- the location.MalformedURLException
- when the location URL is malformed.public InputStream getResourceAsStream(String location)
getResourceAsStream
in interface ResourceManager
location
- the location.public Stream<String> getAllLocations()
getAllLocations
in interface ResourceManager
Copyright © 2020. All rights reserved.