Package org.xmlresolver.sources
Class ResolverInputSource
- java.lang.Object
-
- org.xml.sax.InputSource
-
- org.xmlresolver.sources.ResolverInputSource
-
- All Implemented Interfaces:
ResolverResourceInfo
public class ResolverInputSource extends org.xml.sax.InputSource implements ResolverResourceInfo
AInputSourcewith aresolvedURI.
-
-
Constructor Summary
Constructors Constructor Description ResolverInputSource(ResourceResponse rsrc)Construct the @link org.xml.sax.InputSource} directly from a ResolvedResource
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetHeader(java.lang.String headerName)Get the value of a header field.java.util.Map<java.lang.String,java.util.List<java.lang.String>>getHeaders()Return the headers associated with this resource.java.net.URIgetResolvedURI()Returns the resolved URI associated with the request.ResourceResponsegetResponse()Returns the underlying resolver response.intgetStatusCode()Returns the status code associated with the request.
-
-
-
Constructor Detail
-
ResolverInputSource
public ResolverInputSource(ResourceResponse rsrc)
Construct the @link org.xml.sax.InputSource} directly from a ResolvedResource- Parameters:
rsrc- the resolved resource
-
-
Method Detail
-
getResponse
public ResourceResponse getResponse()
Description copied from interface:ResolverResourceInfoReturns the underlying resolver response.- Specified by:
getResponsein interfaceResolverResourceInfo- Returns:
- The response.
-
getResolvedURI
public java.net.URI getResolvedURI()
Description copied from interface:ResolverResourceInfoReturns the resolved URI associated with the request.- Specified by:
getResolvedURIin interfaceResolverResourceInfo- Returns:
- the resolved URI.
-
getStatusCode
public int getStatusCode()
Description copied from interface:ResolverResourceInfoReturns the status code associated with the request.If the response included a status code, that value will be returned. For protocols that don't have a status code (such as file:), 200 is returned for convenience.
- Specified by:
getStatusCodein interfaceResolverResourceInfo- Returns:
- the status code
-
getHeaders
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getHeaders()
Description copied from interface:ResolverResourceInfoReturn the headers associated with this resource.Returns the headers, if any, associated with this resource. For example, an HTTP resource might include the headers returned by the server.
- Specified by:
getHeadersin interfaceResolverResourceInfo- Returns:
- the headers
-
getHeader
public java.lang.String getHeader(java.lang.String headerName)
Description copied from interface:ResolverResourceInfoGet the value of a header field.Returns the first value of a header witht he specified name. This is a convenience method because header names have to be compared without case sensitivity. If the header has more than one value, only the first is returned.
- Specified by:
getHeaderin interfaceResolverResourceInfo- Parameters:
headerName- the name of the header whose value should be returned.- Returns:
- the (first value) of the named header.
-
-