Package 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 betweenURIResolvertoResourceResolver. This adapter allows users to utilize the resolvers from the XML library for resource acquisition.
-
-
Constructor Summary
Constructors Constructor Description URIResolverAdapter(URIResolver resolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OutputStreamgetOutputStream(URI uri)Gets an output stream of a given URI.ResourcegetResource(URI uri)Get a resource given the URI pointing to said resource.
-
-
-
Constructor Detail
-
URIResolverAdapter
public URIResolverAdapter(URIResolver resolver)
- Parameters:
resolver- the desiredURIResolver
-
-
Method Detail
-
getResource
public Resource getResource(URI uri) throws IOException
Get a resource given the URI pointing to said resource.- Specified by:
getResourcein interfaceResourceResolver- 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:
getOutputStreamin interfaceResourceResolver- Parameters:
uri- the output stream URI- Returns:
- the output stream
- Throws:
IOException- if an I/O error occured while creating an output stream
-
-