org.knopflerfish.framework
Class ReferenceURLStreamHandler
java.lang.Object
java.net.URLStreamHandler
org.knopflerfish.framework.ReferenceURLStreamHandler
public class ReferenceURLStreamHandler
- extends java.net.URLStreamHandler
Reference URL handling, used for accepting file: references.
Accepts URLs on the form
reference:file URL]
Where [file URL] is any valid file: URL.
openConnection simply returns the URLConnection
created by removing the reference: prefix.
Field Summary |
static java.lang.String |
PROTOCOL
|
Method Summary |
protected static java.lang.String |
getActual(java.net.URL u)
Get the actual URL string represented by the specified
reference: URL. |
java.net.URLConnection |
openConnection(java.net.URL url)
|
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 |
PROTOCOL
public static final java.lang.String PROTOCOL
- See Also:
- Constant Field Values
openConnection
public java.net.URLConnection openConnection(java.net.URL url)
throws java.io.IOException
- Specified by:
openConnection
in class java.net.URLStreamHandler
- Throws:
java.io.IOException
- if the specified URL is not a reference to a
file: URL
getActual
protected static java.lang.String getActual(java.net.URL u)
- Get the actual URL string represented by the specified
reference: URL.
- Throws:
java.lang.IllegalArgumentException
- if the specified URL does not
have a reference: protocol.