public class BundleURLStreamHandler
extends java.net.URLStreamHandler
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PERM_OK |
static java.lang.String |
PROTOCOL |
Constructor and Description |
---|
BundleURLStreamHandler() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
equals(java.net.URL u1,
java.net.URL u2)
Equals calculation for bundle URLs.
|
protected java.net.InetAddress |
getHostAddress(java.net.URL url) |
static long |
getId(java.lang.String host) |
protected int |
hashCode(java.net.URL u)
Provides the hash calculation
|
protected boolean |
hostsEqual(java.net.URL u1,
java.net.URL u2)
Compares the host components of two URLs.
|
java.net.URLConnection |
openConnection(java.net.URL u) |
protected void |
parseURL(java.net.URL u,
java.lang.String s,
int start,
int limit) |
protected boolean |
sameFile(java.net.URL u1,
java.net.URL u2)
Compare two urls to see whether they refer to the same file,
i.e., having the same protocol, host, port, and path.
|
protected java.lang.String |
toExternalForm(java.net.URL url)
Converts a bundle URL to a String.
|
public static final java.lang.String PROTOCOL
public static final java.lang.String PERM_OK
public java.net.URLConnection openConnection(java.net.URL u) throws java.io.IOException
openConnection
in class java.net.URLStreamHandler
java.io.IOException
protected void parseURL(java.net.URL u, java.lang.String s, int start, int limit)
parseURL
in class java.net.URLStreamHandler
protected boolean equals(java.net.URL u1, java.net.URL u2)
equals
in class java.net.URLStreamHandler
protected int hashCode(java.net.URL u)
hashCode
in class java.net.URLStreamHandler
protected boolean sameFile(java.net.URL u1, java.net.URL u2)
sameFile
in class java.net.URLStreamHandler
protected boolean hostsEqual(java.net.URL u1, java.net.URL u2)
hostsEqual
in class java.net.URLStreamHandler
u1
- the URL of the first host to compareu2
- the URL of the second host to compareprotected java.lang.String toExternalForm(java.net.URL url)
toExternalForm
in class java.net.URLStreamHandler
url
- the URL.protected java.net.InetAddress getHostAddress(java.net.URL url)
getHostAddress
in class java.net.URLStreamHandler
public static long getId(java.lang.String host)