Interface ResourceProvider
- All Known Implementing Classes:
ClasspathResourceProvider
,FilesystemResourceProviderImpl
public interface ResourceProvider
Interface to a provider of resources.
Paths are specified in the style of a UNIX filepath, using "/" as a separator character.
Paths are specified in the style of a UNIX filepath, using "/" as a separator character.
-
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
Loads a binary resource- Parameters:
name
- the resource name, expressed as a path (see the comments on ResourceProvider)- Returns:
- Throws:
ResourceNotFoundException
-
getTextResource
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- Parameters:
name
- the resource name, expressed as a path using / as a separator character- Returns:
- Throws:
ResourceNotFoundException
-
getPropertyResource
Loads a resource containing a property file- Parameters:
name
- the resource name, expressed as a path with / characters to separate- Returns:
- Throws:
ResourceNotFoundException
-