Package org.smooks.api.resource
Interface ContainerResourceLocator
-
- All Superinterfaces:
ExternalResourceLocator
- All Known Implementing Classes:
URIResourceLocator
public interface ContainerResourceLocator extends ExternalResourceLocator
Interface for locating stream resources from the container..- Author:
- tfennelly
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description URI
getBaseURI()
Get the base URI for the locator instance.InputStream
getResource(String configName, String defaultURI)
Get the resource specified by the container 'config' value.-
Methods inherited from interface org.smooks.api.resource.ExternalResourceLocator
getResource
-
-
-
-
Method Detail
-
getResource
InputStream getResource(String configName, String defaultURI) throws IllegalArgumentException, IOException
Get the resource specified by the container 'config' value. If the config value isn't specified, uses the defaultLocation.- Parameters:
configName
- The container configuration entry name whose value specifies the location of the resource.defaultURI
- The default location for the resource.- Returns:
- The InputStream associated with resource.
- Throws:
IllegalArgumentException
- Illegal argument. Check the cause exception for more information.IOException
- Unable to get the resource stream.
-
getBaseURI
URI getBaseURI()
Get the base URI for the locator instance.- Returns:
- The base URI for the locator instance.
-
-