Class ClasspathResourceProvider
java.lang.Object
com.peterphi.std.guice.common.resource.impl.ClasspathResourceProvider
- All Implemented Interfaces:
ResourceProvider
-
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.
-
Method Details
-
getBinaryResource
Description copied from interface:ResourceProviderLoads a binary resource- Specified by:
getBinaryResourcein interfaceResourceProvider- Parameters:
name- the resource name, expressed as a path (see the comments on ResourceProvider)- Returns:
- Throws:
ResourceNotFoundException
-
getTextResource
Description copied from interface:ResourceProviderLoads 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:
getTextResourcein interfaceResourceProvider- Parameters:
name- the resource name, expressed as a path using / as a separator character- Returns:
- Throws:
ResourceNotFoundException
-
getPropertyResource
Description copied from interface:ResourceProviderLoads a resource containing a property file- Specified by:
getPropertyResourcein interfaceResourceProvider- Parameters:
name- the resource name, expressed as a path with / characters to separate- Returns:
- Throws:
ResourceNotFoundException
-