| java.lang.Object java.net.URLStreamHandler
URLStreamHandler | abstract public class URLStreamHandler (Code) | | The abstract superclass of all classes that implement Protocol Handler.
|
Method Summary | |
protected boolean | equals(URL url1, URL url2) Compares the two urls, and answers true if they represent the same URL. | protected int | getDefaultPort() Return the default port. | protected InetAddress | getHostAddress(URL url) Return the InetAddress for the host of the URL, or null. | protected int | hashCode(URL url) Answers a hash code for the URL object. | protected boolean | hostsEqual(URL url1, URL url2) Compares the two urls, and answers true if they have the same host
components. | abstract protected URLConnection | openConnection(URL u) Establishes a connection to the resource specified by URL . | protected URLConnection | openConnection(URL u, Proxy proxy) The method is the same as openConnection(URL u) except
that it uses the proxy to establish a connection to the
URL . | protected void | parseURL(URL u, String str, int start, int end) Parse the string str into URL using u's
context. | protected boolean | sameFile(URL url1, URL url2) Answers true if the urls refer to the same file. | protected void | setURL(URL u, String protocol, String host, int port, String file, String ref) | protected void | setURL(URL u, String protocol, String host, int port, String authority, String userInfo, String file, String query, String ref) | protected String | toExternalForm(URL url) Answers the string equivalent of an URL using HTTP parsinf format. |
equals | protected boolean equals(URL url1, URL url2)(Code) | | Compares the two urls, and answers true if they represent the same URL.
Two URLs are equal if they have the same file, host, port, protocol,
query, and ref components.
Parameters: url1 - URL the first URL to compare Parameters: url2 - URL the second URL to compare true if the URLs are the same false if the URLs are different See Also: URLStreamHandler.hashCode |
getDefaultPort | protected int getDefaultPort()(Code) | | Return the default port.
|
getHostAddress | protected InetAddress getHostAddress(URL url)(Code) | | Return the InetAddress for the host of the URL, or null.
|
hashCode | protected int hashCode(URL url)(Code) | | Answers a hash code for the URL object.
int the hashcode for hashtable indexing |
hostsEqual | protected boolean hostsEqual(URL url1, URL url2)(Code) | | Compares the two urls, and answers true if they have the same host
components.
true if the hosts of the URLs are the samefalse if the hosts are different |
openConnection | abstract protected URLConnection openConnection(URL u) throws IOException(Code) | | Establishes a connection to the resource specified by URL .
Since different protocols may have unique ways of connecting, it must be
overwritten by the subclass.
java.net.URLConnection Parameters: u - java.net.URL exception: IOException - thrown if an IO error occurs during connectionestablishment |
openConnection | protected URLConnection openConnection(URL u, Proxy proxy) throws IOException(Code) | | The method is the same as openConnection(URL u) except
that it uses the proxy to establish a connection to the
URL . Since different protocols may have different ways of
connecting, it must be overwritten by the subclass.
java.net.URLConnection Parameters: u - java.net.URL Parameters: proxy - the proxy which is used to make the connection throws: IOException - thrown if an IO error occurs during connection establishment throws: IllegalArgumentException - if any argument is null or the type of proxy is wrong. throws: UnsupportedOperationException - if the protocol handler doesn't support this method. |
parseURL | protected void parseURL(URL u, String str, int start, int end)(Code) | | Parse the string str into URL using u's
context. URL strings generally have the following format:
//www.company.com/java/file1.java#reference
The string is parsed in HTTP format. If the protocol has a different URL
format this method must be overridden.
Parameters: u - java.net.URL The URL to receive parsed values. Parameters: str - java.lang.String The string URL spec from which u is derived Parameters: start - int The index in the string from which to begin parsing Parameters: end - int The index to stop parsing See Also: URLStreamHandler.toExternalForm See Also: URL |
sameFile | protected boolean sameFile(URL url1, URL url2)(Code) | | Answers true if the urls refer to the same file. Compares the protocol,
host, port and file components.
boolean true if the same resource, false otherwise |
setURL | protected void setURL(URL u, String protocol, String host, int port, String file, String ref)(Code) | | Sets the fields of the URL with the supplied arguments
Parameters: u - java.net.URL The non-null URL to be set Parameters: protocol - java.lang.String The protocol Parameters: host - java.lang.String The host name Parameters: port - int The port number Parameters: file - java.lang.String The file component Parameters: ref - java.lang.String The reference See Also: java.util.Set |
setURL | protected void setURL(URL u, String protocol, String host, int port, String authority, String userInfo, String file, String query, String ref)(Code) | | Sets the fields of the URL with the supplied arguments
Parameters: u - java.net.URL The non-null URL to be set Parameters: protocol - java.lang.String The protocol Parameters: host - java.lang.String The host name Parameters: port - int The port number Parameters: authority - java.lang.String The authority Parameters: userInfo - java.lang.String The user info Parameters: file - java.lang.String The file component Parameters: query - java.lang.String The query Parameters: ref - java.lang.String The reference See Also: java.util.Set |
toExternalForm | protected String toExternalForm(URL url)(Code) | | Answers the string equivalent of an URL using HTTP parsinf format.
java.lang.String the string representation of this URL Parameters: url - java.net.URL the url object to be processed See Also: URLStreamHandler.parseURL See Also: URL.toExternalForm |
|
|