Class FilesystemResourceProviderImpl
java.lang.Object
com.peterphi.std.guice.common.resource.impl.FilesystemResourceProviderImpl
- All Implemented Interfaces:
ResourceProvider
An implementation of ResourceProvider that loads resources from a folder on the local filesystem
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetBinaryResource
(String name) Loads a binary resourcegetPropertyResource
(String name) Loads a resource containing a property filegetTextResource
(String name) Loads a text resource.
-
Constructor Details
-
FilesystemResourceProviderImpl
-
-
Method Details
-
getBinaryResource
Description copied from interface:ResourceProvider
Loads a binary resource- Specified by:
getBinaryResource
in interfaceResourceProvider
- Parameters:
name
- the resource name, expressed as a path (see the comments on ResourceProvider)- Returns:
-
getTextResource
Description copied from interface:ResourceProvider
Loads a text resource. If it is necessary to make assumptions about the underlying encoding of a resource (e.g. the remote resource provider does not support then UTF-8 will be used- Specified by:
getTextResource
in interfaceResourceProvider
- Parameters:
name
- the resource name, expressed as a path using / as a separator character- Returns:
-
getPropertyResource
Description copied from interface:ResourceProvider
Loads a resource containing a property file- Specified by:
getPropertyResource
in interfaceResourceProvider
- Parameters:
name
- the resource name, expressed as a path with / characters to separate- Returns:
-