org.apache.xmlgraphics.io
Class URIResolverAdapter
java.lang.Object
org.apache.xmlgraphics.io.URIResolverAdapter
- All Implemented Interfaces:
- ResourceResolver
public class URIResolverAdapter
- extends Object
- implements ResourceResolver
An adapter between URIResolver
to ResourceResolver
. This adapter allows users
to utilize the resolvers from the XML library for resource acquisition.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
URIResolverAdapter
public URIResolverAdapter(URIResolver resolver)
- Parameters:
resolver
- the desired URIResolver
getResource
public Resource getResource(URI uri)
throws IOException
- Get a resource given the URI pointing to said resource.
- Specified by:
getResource
in interface ResourceResolver
- Parameters:
uri
- the resource URI
- Returns:
- the resource
- Throws:
IOException
- if an I/O error occured during resource acquisition
getOutputStream
public OutputStream getOutputStream(URI uri)
throws IOException
- Gets an output stream of a given URI.
- Specified by:
getOutputStream
in interface ResourceResolver
- Parameters:
uri
- the output stream URI
- Returns:
- the output stream
- Throws:
IOException
- if an I/O error occured while creating an output stream
Copyright 1999-2015 The Apache Software Foundation. All Rights Reserved.