Package org.apache.fop.afp.util
Class AFPResourceAccessor
java.lang.Object
org.apache.fop.afp.util.AFPResourceAccessor
Defines an interface through which external resource objects can be accessed.
-
Constructor Summary
ConstructorDescriptionAFPResourceAccessor
(InternalResourceResolver resourceResolver) Constructor for resource to be accessed via theFOUserAgent
.AFPResourceAccessor
(InternalResourceResolver resourceResolver, String baseURI) Constructor for resource to be accessed via theFOUserAgent
. -
Method Summary
Modifier and TypeMethodDescriptioncreateInputStream
(URI uri) Creates anInputStream
given a URI.resolveURI
(String uri) Returns the resolved URI, given the URI of a resource.
-
Constructor Details
-
AFPResourceAccessor
Constructor for resource to be accessed via theFOUserAgent
. This contructor takes a base URI for resolving font resource URIs. So, if fonts need to be accessed, you can set theFontManager
's base URI instead of the one on theFopFactory
.- Parameters:
resourceResolver
- the resolver of resourcesbaseURI
- the custom base URI to resolve relative URIs against (may be null)
-
AFPResourceAccessor
Constructor for resource to be accessed via theFOUserAgent
.- Parameters:
resourceResolver
- the resolver of resources
-
-
Method Details
-
createInputStream
Creates anInputStream
given a URI.- Parameters:
uri
- the URI of the InputStream- Returns:
- an InputStream
- Throws:
IOException
- if an I/O error occurs while creating the InputStream.
-
resolveURI
Returns the resolved URI, given the URI of a resource.- Parameters:
uri
- the resource URI- Returns:
- the resolved URI
-