org.openorb.util.urlhandler.classpath
Class Handler
java.lang.Object
|
+--java.net.URLStreamHandler
|
+--org.openorb.util.urlhandler.classpath.Handler
- public final class Handler
- extends URLStreamHandler
This class is an extension of the URLStreamHandler class. It overrides
the method openConnection and adds a level of indirection to the way
resources are loaded from a URL.
- Version:
- $Revision: 1.3 $ $Date: 2004/02/10 21:28:45 $
- Author:
- Chris Wood
|
Constructor Summary |
Handler()
The empty default constructor is important because the java URL
class does a newInstance. |
Handler(ClassLoader cl)
Creates a new Handler |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Handler
public Handler()
- The empty default constructor is important because the java URL
class does a newInstance.
Handler
public Handler(ClassLoader cl)
- Creates a new Handler
- Parameters:
cl - the classloader used for loading ressources, null falls back
to the current thread classloader
openConnection
protected URLConnection openConnection(URL url)
throws IOException
- Opens a connection to the specified URL.
- Overrides:
openConnection in class URLStreamHandler
- Parameters:
url - A URL to open a connection to.- Returns:
- The established connection.
- Throws:
IOException - When the file specified by the
URL could not be found.