public class DefaultFileSystemResourceLoader extends java.lang.Object implements FileSystemResourceLoader
| Constructor and Description |
|---|
DefaultFileSystemResourceLoader()
Default constructor.
|
DefaultFileSystemResourceLoader(java.io.File baseDirPath) |
DefaultFileSystemResourceLoader(java.nio.file.Path path) |
DefaultFileSystemResourceLoader(java.lang.String path) |
| Modifier and Type | Method and Description |
|---|---|
ResourceLoader |
forBase(java.lang.String basePath)
Constructs a new resource loader designed to load
resources from the given path.
|
java.util.Optional<java.net.URL> |
getResource(java.lang.String path)
Obtains the URL to a given resource.
|
java.util.Optional<java.io.InputStream> |
getResourceAsStream(java.lang.String path)
Obtains a resource as a stream.
|
java.util.stream.Stream<java.net.URL> |
getResources(java.lang.String name)
Obtains all resources with the given name.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdefaultLoader, supportsPrefixpublic DefaultFileSystemResourceLoader()
public DefaultFileSystemResourceLoader(java.io.File baseDirPath)
baseDirPath - The base directorypublic DefaultFileSystemResourceLoader(java.lang.String path)
path - The pathpublic DefaultFileSystemResourceLoader(java.nio.file.Path path)
path - The pathpublic java.util.Optional<java.io.InputStream> getResourceAsStream(java.lang.String path)
ResourceLoadergetResourceAsStream in interface ResourceLoaderpath - The pathpublic java.util.Optional<java.net.URL> getResource(java.lang.String path)
ResourceLoadergetResource in interface ResourceLoaderpath - The pathpublic java.util.stream.Stream<java.net.URL> getResources(java.lang.String name)
ResourceLoadergetResources in interface ResourceLoadername - The name of the resourcepublic ResourceLoader forBase(java.lang.String basePath)
ResourceLoaderforBase in interface ResourceLoaderbasePath - The path to load resources