@Indexed(value=ResourceLoader.class) public interface ResourceLoader
Modifier and Type | Method and Description |
---|---|
ResourceLoader |
forBase(String basePath)
Constructs a new resource loader designed to load
resources from the given path.
|
Optional<URL> |
getResource(String path)
Obtains the URL to a given resource.
|
Optional<InputStream> |
getResourceAsStream(String path)
Obtains a resource as a stream.
|
Stream<URL> |
getResources(String name)
Obtains all resources with the given name.
|
boolean |
supportsPrefix(String path) |
Optional<InputStream> getResourceAsStream(String path)
path
- The pathOptional<URL> getResource(String path)
path
- The pathStream<URL> getResources(String name)
name
- The name of the resourceboolean supportsPrefix(String path)
path
- The path to a resource including a prefix
appended by a colon. Ex (classpath:, file:)ResourceLoader forBase(String basePath)
basePath
- The path to load resourcesResourceLoader