fop 2.3

## org.apache.fop.afp.util
Class AFPResourceAccessor

    java.lang.Object
      org.apache.fop.afp.util.AFPResourceAccessor

    public final class AFPResourceAccessor

extends java.lang.Object

Defines an interface through which external resource objects can be accessed.

Constructor Summary
`AFPResourceAccessor(InternalResourceResolver resourceResolver)` Constructor for resource to be accessed via the `FOUserAgent`.
`AFPResourceAccessor(InternalResourceResolver resourceResolver, java.lang.String baseURI)` Constructor for resource to be accessed via the `FOUserAgent`.

Method Summary
`java.io.InputStream` `createInputStream(java.net.URI uri)` Creates an `InputStream` given a URI.
`java.net.URI` `resolveURI(java.lang.String uri)` Returns the resolved URI, given the URI of a resource.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AFPResourceAccessor

    public AFPResourceAccessor(InternalResourceResolver resourceResolver,
                               java.lang.String baseURI)

  Constructor for resource to be accessed via the `FOUserAgent`. This contructor takes a base URI for resolving font resource URIs. So, if fonts need to be accessed, you can set the `FontManager`'s base URI instead of the one on the `FopFactory`.

  Parameters:
    `resourceResolver` - the resolver of resources
    `baseURI` - the custom base URI to resolve relative URIs against (may be null)

### AFPResourceAccessor

    public AFPResourceAccessor(InternalResourceResolver resourceResolver)

  Constructor for resource to be accessed via the `FOUserAgent`.

  Parameters:
    `resourceResolver` - the resolver of resources

Method Detail

### createInputStream

    public java.io.InputStream createInputStream(java.net.URI uri)
                                          throws java.io.IOException

  Creates an `InputStream` given a URI.

  Parameters:
    `uri` - the URI of the InputStream
  Returns:
    an InputStream
  Throws:
    `java.io.IOException` - if an I/O error occurs while creating the InputStream.

### resolveURI

    public java.net.URI resolveURI(java.lang.String uri)

  Returns the resolved URI, given the URI of a resource.

  Parameters:
    `uri` - the resource URI
  Returns:
    the resolved URI

fop 2.3

Copyright 1999-2018 The Apache Software Foundation. All Rights Reserved.