dsto.dfc.net.streams.resource
Class Handler
java.lang.Object
java.net.URLStreamHandler
dsto.dfc.net.streams.resource.Handler
public class Handler
- extends URLStreamHandler
Handler for URL's using the "resource:" protocol. Searches the
current Java resource path (using Class.getResource(java.lang.String)
for the
URL contents.
- Version:
- $Revision$
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 |
Handler
public Handler()
getInstance
public static Handler getInstance()
- Get the singleton instance of this class. Other instances may be
safely created as well.
register
public static void register()
throws UnsupportedOperationException
- Register this class as the handler for the "resource:" URL
protocol. May be called more than once.
- Throws:
UnsupportedOperationException
openConnection
public URLConnection openConnection(URL url)
throws IOException
- Specified by:
openConnection
in class URLStreamHandler
- Throws:
IOException
Copyright © 2008 Commonwealth of Australia