|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.net.URLStreamHandler
public abstract class URLStreamHandler
The abstract superclass of all classes that implement Protocol Handler.
| Constructor Summary | |
|---|---|
URLStreamHandler()
|
|
| Method Summary | |
|---|---|
protected boolean |
equals(URL url1,
URL url2)
Compares the two urls, and returns 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)
Returns a hash code for the URL object. |
protected boolean |
hostsEqual(URL url1,
URL url2)
Compares the two urls, and returns true if they have the same host components. |
protected abstract 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 stringstr into URL using u's
context. |
protected boolean |
sameFile(URL url1,
URL url2)
Returns true if the urls refer to the same file. |
protected void |
setURL(URL u,
String protocol,
String host,
int port,
String file,
String ref)
Deprecated. use setURL(URL, String String, int, String, String, String, String, String) |
protected void |
setURL(URL u,
String protocol,
String host,
int port,
String authority,
String userInfo,
String file,
String query,
String ref)
Sets the fields of the URL with the supplied arguments |
protected String |
toExternalForm(URL url)
Returns the string equivalent of an URL using HTTP parsinf format. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public URLStreamHandler()
| Method Detail |
|---|
protected abstract URLConnection openConnection(URL u)
throws IOException
URL.
Since different protocols may have unique ways of connecting, it must be
overwritten by the subclass.
u - java.net.URL
IOException - thrown if an IO error occurs during connection
establishment
protected URLConnection openConnection(URL u,
Proxy proxy)
throws IOException
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.
u - java.net.URLproxy - the proxy which is used to make the connection
IOException - thrown if an IO error occurs during connection establishment
IllegalArgumentException - if any argument is null or the type of proxy is wrong.
UnsupportedOperationException - if the protocol handler doesn't support this method.
protected void parseURL(URL u,
String str,
int start,
int end)
stringstr 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.
u - java.net.URL The URL to receive parsed values.str - java.lang.String The string URL spec from which u is derivedstart - int The index in the string from which to begin parsingend - int The index to stop parsingtoExternalForm(java.net.URL),
URL
@Deprecated
protected void setURL(URL u,
String protocol,
String host,
int port,
String file,
String ref)
URL with the supplied arguments
u - java.net.URL The non-null URL to be setprotocol - java.lang.String The protocolhost - java.lang.String The host nameport - int The port numberfile - java.lang.String The file componentref - java.lang.String The referenceSet
protected void setURL(URL u,
String protocol,
String host,
int port,
String authority,
String userInfo,
String file,
String query,
String ref)
URL with the supplied arguments
u - java.net.URL The non-null URL to be setprotocol - java.lang.String The protocolhost - java.lang.String The host nameport - int The port numberauthority - java.lang.String The authorityuserInfo - java.lang.String The user infofile - java.lang.String The file componentquery - java.lang.String The queryref - java.lang.String The referenceSetprotected String toExternalForm(URL url)
url - java.net.URL the url object to be processed
parseURL(java.net.URL, java.lang.String, int, int),
URL.toExternalForm()
protected boolean equals(URL url1,
URL url2)
url1 - URL the first URL to compareurl2 - URL the second URL to compare
true if the URLs are the same false
if the URLs are differenthashCode(java.net.URL)protected int getDefaultPort()
protected InetAddress getHostAddress(URL url)
protected int hashCode(URL url)
protected boolean hostsEqual(URL url1,
URL url2)
true if the hosts of the URLs are the same
false if the hosts are different
protected boolean sameFile(URL url1,
URL url2)
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||