Class AbstractURLStreamHandlerService

  • All Implemented Interfaces:
    URLStreamHandlerService

    @ConsumerType
    public abstract class AbstractURLStreamHandlerService
    extends java.net.URLStreamHandler
    implements URLStreamHandlerService
    Abstract implementation of the URLStreamHandlerService interface. All the methods simply invoke the corresponding methods on java.net.URLStreamHandler except for parseURL and setURL, which use the URLStreamHandlerSetter parameter. Subclasses of this abstract class should not need to override the setURL and parseURL(URLStreamHandlerSetter,...) methods.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.net.URL u1, java.net.URL u2)
      This method calls super.equals(URL,URL).
      int getDefaultPort()
      This method calls super.getDefaultPort.
      java.net.InetAddress getHostAddress​(java.net.URL u)
      This method calls super.getHostAddress.
      int hashCode​(java.net.URL u)
      This method calls super.hashCode(URL).
      boolean hostsEqual​(java.net.URL u1, java.net.URL u2)
      This method calls super.hostsEqual.
      abstract java.net.URLConnection openConnection​(java.net.URL u)  
      void parseURL​(URLStreamHandlerSetter realHandler, java.net.URL u, java.lang.String spec, int start, int limit)
      Parse a URL using the URLStreamHandlerSetter object.
      boolean sameFile​(java.net.URL u1, java.net.URL u2)
      This method calls super.sameFile.
      java.lang.String toExternalForm​(java.net.URL u)
      This method calls super.toExternalForm.
      • Methods inherited from class java.lang.Object

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

      • AbstractURLStreamHandlerService

        public AbstractURLStreamHandlerService()
    • Method Detail

      • openConnection

        public abstract java.net.URLConnection openConnection​(java.net.URL u)
                                                       throws java.io.IOException
        Specified by:
        openConnection in interface URLStreamHandlerService
        Throws:
        java.io.IOException
        See Also:
        "java.net.URLStreamHandler.openConnection"
      • parseURL

        public void parseURL​(URLStreamHandlerSetter realHandler,
                             java.net.URL u,
                             java.lang.String spec,
                             int start,
                             int limit)
        Parse a URL using the URLStreamHandlerSetter object. This method sets the realHandler field with the specified URLStreamHandlerSetter object and then calls parseURL(URL,String,int,int).
        Specified by:
        parseURL in interface URLStreamHandlerService
        Parameters:
        realHandler - The object on which the setURL method must be invoked for the specified URL.
        See Also:
        "java.net.URLStreamHandler.parseURL"
      • toExternalForm

        public java.lang.String toExternalForm​(java.net.URL u)
        This method calls super.toExternalForm.
        Specified by:
        toExternalForm in interface URLStreamHandlerService
        See Also:
        "java.net.URLStreamHandler.toExternalForm"
      • equals

        public boolean equals​(java.net.URL u1,
                              java.net.URL u2)
        This method calls super.equals(URL,URL).
        Specified by:
        equals in interface URLStreamHandlerService
        See Also:
        "java.net.URLStreamHandler.equals(URL,URL)"
      • getDefaultPort

        public int getDefaultPort()
        This method calls super.getDefaultPort.
        Specified by:
        getDefaultPort in interface URLStreamHandlerService
        See Also:
        "java.net.URLStreamHandler.getDefaultPort"
      • getHostAddress

        public java.net.InetAddress getHostAddress​(java.net.URL u)
        This method calls super.getHostAddress.
        Specified by:
        getHostAddress in interface URLStreamHandlerService
        See Also:
        "java.net.URLStreamHandler.getHostAddress"
      • hashCode

        public int hashCode​(java.net.URL u)
        This method calls super.hashCode(URL).
        Specified by:
        hashCode in interface URLStreamHandlerService
        See Also:
        "java.net.URLStreamHandler.hashCode(URL)"
      • hostsEqual

        public boolean hostsEqual​(java.net.URL u1,
                                  java.net.URL u2)
        This method calls super.hostsEqual.
        Specified by:
        hostsEqual in interface URLStreamHandlerService
        See Also:
        "java.net.URLStreamHandler.hostsEqual"
      • sameFile

        public boolean sameFile​(java.net.URL u1,
                                java.net.URL u2)
        This method calls super.sameFile.
        Specified by:
        sameFile in interface URLStreamHandlerService
        See Also:
        "java.net.URLStreamHandler.sameFile"