Class AbstractLocalURLStreamHandler

  • Direct Known Subclasses:
    FileURLStreamHandler, VirtualFileURLStreamHandler

    public abstract class AbstractLocalURLStreamHandler
    extends java.net.URLStreamHandler
    Abstract URLStreamHandler that can be used as a base for other URLStreamHandlers that require the URL to be local.
    Version:
    $Revision$
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.util.Set<java.lang.String> locals  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void ensureLocal​(java.net.URL url)  
      protected boolean hostsEqual​(java.net.URL url1, java.net.URL url2)  
      protected java.net.URLConnection openConnection​(java.net.URL u, java.net.Proxy p)  
      private static java.lang.String toLower​(java.lang.String str)  
      • Methods inherited from class java.net.URLStreamHandler

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

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

      • locals

        private static final java.util.Set<java.lang.String> locals
    • Constructor Detail

      • AbstractLocalURLStreamHandler

        public AbstractLocalURLStreamHandler()
    • Method Detail

      • toLower

        private static java.lang.String toLower​(java.lang.String str)
      • openConnection

        protected java.net.URLConnection openConnection​(java.net.URL u,
                                                        java.net.Proxy p)
                                                 throws java.io.IOException
        Overrides:
        openConnection in class java.net.URLStreamHandler
        Throws:
        java.io.IOException
      • hostsEqual

        protected boolean hostsEqual​(java.net.URL url1,
                                     java.net.URL url2)
        Overrides:
        hostsEqual in class java.net.URLStreamHandler
      • ensureLocal

        protected void ensureLocal​(java.net.URL url)
                            throws java.io.IOException
        Throws:
        java.io.IOException