Class AbstractURLStreamHandlerService

  • All Implemented Interfaces:
    URLStreamHandlerService

    @ConsumerType
    public abstract class AbstractURLStreamHandlerService
    extends 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.
    • Constructor Detail

      • AbstractURLStreamHandlerService

        public AbstractURLStreamHandlerService()
    • Method Detail

      • parseURL

        public void parseURL​(URLStreamHandlerSetter realHandler,
                             URL u,
                             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"
      • equals

        public boolean equals​(URL u1,
                              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"
      • hashCode

        public int hashCode​(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​(URL u1,
                                  URL u2)
        This method calls super.hostsEqual.
        Specified by:
        hostsEqual in interface URLStreamHandlerService
        See Also:
        "java.net.URLStreamHandler.hostsEqual"
      • sameFile

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