Class Base64ResourceLoader
java.lang.Object
io.micronaut.core.io.value.Base64ResourceLoader
- All Implemented Interfaces:
ResourceLoader
A
ResourceLoader that returns a fixed decoded base64 value.- Since:
- 4.10.0
- Author:
- Jonas Konrad
-
Method Summary
Modifier and TypeMethodDescriptionprotected Optional<byte[]> final ResourceLoaderConstructs a new resource loader designed to load resources from the given path.static ResourceLoadergetResource(String path) Obtains the URL to a given resource.final Optional<InputStream> getResourceAsStream(String path) Obtains a resource as a stream.getResources(String name) Obtains all resources with the given name.final booleansupportsPrefix(String path) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ResourceLoader
reportResourceDuplicates
-
Method Details
-
getInstance
-
extract
-
forBase
Description copied from interface:ResourceLoaderConstructs a new resource loader designed to load resources from the given path. Requested resources will be loaded within the context of the given path.- Specified by:
forBasein interfaceResourceLoader- Parameters:
basePath- The path to load resources- Returns:
- The new
ResourceLoader
-
supportsPrefix
- Specified by:
supportsPrefixin interfaceResourceLoader- Parameters:
path- The path to a resource including a prefix appended by a colon. Ex (classpath:, file:)- Returns:
- Whether the given resource loader supports the prefix
-
getResources
Description copied from interface:ResourceLoaderObtains all resources with the given name.- Specified by:
getResourcesin interfaceResourceLoader- Parameters:
name- The name of the resource- Returns:
- A stream of URLs
-
getResource
Description copied from interface:ResourceLoaderObtains the URL to a given resource.- Specified by:
getResourcein interfaceResourceLoader- Parameters:
path- The path- Returns:
- An optional resource
-
getResourceAsStream
Description copied from interface:ResourceLoaderObtains a resource as a stream.- Specified by:
getResourceAsStreamin interfaceResourceLoader- Parameters:
path- The path- Returns:
- An optional resource
-