Class ResolverInputSource

    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.net.URI resolvedURI
      The underlying, resolved URI.
    • Constructor Summary

      Constructors 
      Constructor Description
      ResolverInputSource​(java.net.URI localURI, java.io.InputStream stream)
      Construct the InputSource while preserving the local URI.
      ResolverInputSource​(ResolvedResource 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.String getHeader​(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.URI getResolvedURI()
      Returns the resolved URI associated with the request.
      int getStatusCode()
      Returns the status code associated with the request.
      • Methods inherited from class org.xml.sax.InputSource

        getByteStream, getCharacterStream, getEncoding, getPublicId, getSystemId, isEmpty, setByteStream, setCharacterStream, setEncoding, setPublicId, setSystemId
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • resolvedURI

        public final java.net.URI resolvedURI
        The underlying, resolved URI.
    • Constructor Detail

      • ResolverInputSource

        public ResolverInputSource​(java.net.URI localURI,
                                   java.io.InputStream stream)
        Construct the InputSource while preserving the local URI.
        Parameters:
        localURI - The local URI.
        stream - The stream to return for this source.
      • ResolverInputSource

        public ResolverInputSource​(ResolvedResource rsrc)
        Construct the @link org.xml.sax.InputSource} directly from a ResolvedResource
        Parameters:
        rsrc - the resolved resource
    • Method Detail

      • getStatusCode

        public int getStatusCode()
        Description copied from interface: ResolverResourceInfo
        Returns 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:
        getStatusCode in interface ResolverResourceInfo
        Returns:
        the status code
      • getHeaders

        public java.util.Map<java.lang.String,​java.util.List<java.lang.String>> getHeaders()
        Description copied from interface: ResolverResourceInfo
        Return 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:
        getHeaders in interface ResolverResourceInfo
        Returns:
        the headers
      • getHeader

        public java.lang.String getHeader​(java.lang.String headerName)
        Description copied from interface: ResolverResourceInfo
        Get 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:
        getHeader in interface ResolverResourceInfo
        Parameters:
        headerName - the name of the header whose value should be returned.
        Returns:
        the (first value) of the named header.