Class DefaultContentLoader
java.lang.Object
se.idsec.signservice.integration.core.DefaultContentLoader
- All Implemented Interfaces:
ContentLoader
A
ContentLoader
that is used to load file resource contents. If Spring is in the classpath the
org.springframework.core.io.DefaultResourceLoader
class is used. Otherwise, we use our own (limited)
implementation.- Author:
- Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
loadContent
(String resource) Loads the contents of the given resource.
-
Constructor Details
-
DefaultContentLoader
public DefaultContentLoader()Constructor.
-
-
Method Details
-
loadContent
Loads the contents of the given resource.Note: The Spring Framework style of representing a resource must be supported by implementations. For example:
classpath:xyz.svg
andfile:/path/xyz.svg
.- Specified by:
loadContent
in interfaceContentLoader
- Parameters:
resource
- the resource to load- Returns:
- the contents as a byte array
- Throws:
IOException
- if the contents can not be loaded
-