Class URILocationImpl


  • public final class URILocationImpl
    extends URILocation
    An implementation of URILocation
    Version:
    $Revision: 5951 $ $Date: 2005-03-05 06:42:06 -0700 (Sat, 05 Mar 2005) $
    Author:
    Keith Visco
    • Constructor Summary

      Constructors 
      Constructor Description
      URILocationImpl​(java.io.InputStream is, java.lang.String href)
      Creates a new URILocationImpl
      URILocationImpl​(java.io.Reader reader, java.lang.String href)
      Creates a new URILocationImpl
      URILocationImpl​(java.lang.String href)
      Creates a new URILocationImpl
      URILocationImpl​(java.lang.String href, java.lang.String documentBase)
      Creates a new URILocationImpl
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getAbsoluteURI()
      Returns the absolute URI for this URILocation
      java.lang.String getBaseURI()
      Returns the base location of this URILocation.
      java.io.Reader getReader()
      Returns a Reader for the resource represented by this URILocation.
      java.lang.String getRelativeURI()
      Returns the relative URI for this URILocation
      java.lang.String toString()
      Returns the String representation of this URILocation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • URILocationImpl

        public URILocationImpl​(java.lang.String href)
        Creates a new URILocationImpl
      • URILocationImpl

        public URILocationImpl​(java.lang.String href,
                               java.lang.String documentBase)
        Creates a new URILocationImpl
      • URILocationImpl

        public URILocationImpl​(java.io.Reader reader,
                               java.lang.String href)
        Creates a new URILocationImpl
      • URILocationImpl

        public URILocationImpl​(java.io.InputStream is,
                               java.lang.String href)
        Creates a new URILocationImpl
    • Method Detail

      • getBaseURI

        public java.lang.String getBaseURI()
        Returns the base location of this URILocation. If this URILocation is an URL, the base location will be equivalent to the document base for the URL.
        Specified by:
        getBaseURI in class URILocation
        Returns:
        the base location of this URILocation
        See Also:
        getAbsoluteURI(), getRelativeURI()
      • getReader

        public java.io.Reader getReader()
                                 throws java.io.IOException
        Returns a Reader for the resource represented by this URILocation.
        Specified by:
        getReader in class URILocation
        Returns:
        a Reader for the resource represented by this URILocation
        Throws:
        java.io.FileNotFoundException
        java.io.IOException
      • toString

        public java.lang.String toString()
        Returns the String representation of this URILocation.
        Overrides:
        toString in class URILocation
        Returns:
        the String representation of this URILocation