Class Handler


  • public class Handler
    extends MappedURLHandler
    A URL protocol handler for the project: protocol, which accesses the contents of the open project.

    Note: the unusual class name is required for this class to be used by the default protocol handler factory.

    Since:
    3.0
    Author:
    Chris Jennings
    • Constructor Summary

      Constructors 
      Constructor Description
      Handler()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.net.URLConnection mapConnection​(java.net.URL sourceURL, java.net.URL mappedURL)
      Returns a URLConnection for the mapped URL.
      protected void parseURL​(java.net.URL u, java.lang.String spec, int start, int limit)  
      • Methods inherited from class java.net.URLStreamHandler

        equals, getDefaultPort, getHostAddress, hashCode, hostsEqual, openConnection, sameFile, setURL, setURL, toExternalForm
      • Methods inherited from class java.lang.Object

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

      • Handler

        public Handler()
    • Method Detail

      • parseURL

        protected void parseURL​(java.net.URL u,
                                java.lang.String spec,
                                int start,
                                int limit)
        Overrides:
        parseURL in class java.net.URLStreamHandler
      • mapConnection

        protected java.net.URLConnection mapConnection​(java.net.URL sourceURL,
                                                       java.net.URL mappedURL)
                                                throws java.io.IOException
        Description copied from class: MappedURLHandler
        Returns a URLConnection for the mapped URL. The base class returns mappedURL.openConnection().
        Overrides:
        mapConnection in class MappedURLHandler
        Parameters:
        sourceURL - the original URL
        mappedURL - the mapped URL returned from MappedURLHandler.mapURL(java.net.URL)
        Returns:
        a connection for the URL
        Throws:
        java.io.IOException - if an I/O error occurs or the mapped URL is null