public class ReferenceURLStreamHandler
extends java.net.URLStreamHandler
reference:file URL]Where [file URL] is any valid file: URL.
openConnection simply returns the URLConnection created by removing the reference: prefix.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROTOCOL |
Modifier and Type | Method and Description |
---|---|
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) |
public static final java.lang.String PROTOCOL
public java.net.URLConnection openConnection(java.net.URL url) throws java.io.IOException
openConnection
in class java.net.URLStreamHandler
java.io.IOException
- if the specified URL is not a reference to a
file: URLprotected static java.lang.String getActual(java.net.URL u)
java.lang.IllegalArgumentException
- if the specified URL does not
have a reference: protocol.