org.foray.common.url.classpath
Class Handler

java.lang.Object
  extended by java.net.URLStreamHandler
      extended by org.foray.common.url.classpath.Handler

public class Handler
extends URLStreamHandler

Stream handler for URLs with the classpath protocol. Such URLs are used to refer to resources in the CLASSPATH. The two following syntaxes are allowed, but the first one is preferred:


Constructor Summary
Handler()
           
 
Method Summary
protected  URLConnection openConnection(URL u)
           
static void register()
          Register an instance of this class with the given ProtocolHandlerRegistry so that this handler will be used for URLs of protocol "classpath".
 
Methods inherited from class java.net.URLStreamHandler
equals, getDefaultPort, getHostAddress, hashCode, hostsEqual, openConnection, parseURL, 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

openConnection

protected URLConnection openConnection(URL u)
Specified by:
openConnection in class URLStreamHandler

register

public static void register()
Register an instance of this class with the given ProtocolHandlerRegistry so that this handler will be used for URLs of protocol "classpath". This method may be safely called several times; only the first time will be the registration done.



Copyright © 2017. All rights reserved.