public class DefaultFOPResourceAccessor extends SimpleResourceAccessor
ResourceAccessor
interface for use inside FOP.Constructor and Description |
---|
DefaultFOPResourceAccessor(FOUserAgent userAgent,
java.lang.String categoryBaseURI,
java.net.URI baseURI)
Constructor for resource to be accessed via the
FOUserAgent . |
Modifier and Type | Method and Description |
---|---|
java.io.InputStream |
createInputStream(java.net.URI uri)
Creates a new
InputStream for the given URI that allows read access to an external
resource. |
getBaseURI, resolveAgainstBase
public DefaultFOPResourceAccessor(FOUserAgent userAgent, java.lang.String categoryBaseURI, java.net.URI baseURI)
FOUserAgent
. This contructor
can take two base URIs: the category base URI is the one to use when differentiating between
normal resources (ex. images) and font resources. So, if fonts need to be accessed, you can
set the FontManager
's base URI instead of the one on the
FopFactory
.userAgent
- the FO user agentcategoryBaseURI
- the category base URI (may be null)baseURI
- the custom base URI to resolve relative URIs against (may be null)public java.io.InputStream createInputStream(java.net.URI uri) throws java.io.IOException
InputStream
for the given URI that allows read access to an external
resource.createInputStream
in interface ResourceAccessor
createInputStream
in class SimpleResourceAccessor
uri
- the URI of an external resource.java.io.IOException
- if an I/O error occurs while opening the resourceCopyright 1999-2012 The Apache Software Foundation. All Rights Reserved.