Package org.xmlresolver
Class ResourceAccess
- java.lang.Object
-
- org.xmlresolver.ResourceAccess
-
public class ResourceAccess extends java.lang.Object
Static methods for accessing resources.These methods support
data:
andclasspath:
URIs directly. All other schemes are delegated toResourceConnection
.
-
-
Constructor Summary
Constructors Constructor Description ResourceAccess()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ResourceResponse
getResource(ResourceRequest request)
Attempt to get the requested resource.static ResourceResponse
getResource(ResourceResponse response)
Attempt to get the requested resource.
-
-
-
Method Detail
-
getResource
public static ResourceResponse getResource(ResourceRequest request) throws java.net.URISyntaxException, java.io.IOException
Attempt to get the requested resource.This method uses a
ResourceRequest
to formulate the request.- Parameters:
request
- The request.- Returns:
- The response.
- Throws:
java.net.URISyntaxException
- if the request URI is syntactically invalid.java.io.IOException
- if the resource cannot be accessed.
-
getResource
public static ResourceResponse getResource(ResourceResponse response) throws java.net.URISyntaxException, java.io.IOException
Attempt to get the requested resource.This method uses a
ResourceResponse
to formulate the request, for example the response from a catalog lookup request.- Parameters:
response
- The response.- Returns:
- The response.
- Throws:
java.net.URISyntaxException
- if the request URI is syntactically invalid.java.io.IOException
- if the resource cannot be accessed.
-
-