| java.lang.Object | |
| ↳ | java.net.URLStreamHandler |
The abstract superclass of all classes that implement Protocol Handler.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Compares the two urls, and returns true if they represent the same URL.
| |||||||||||
Return the default port.
| |||||||||||
Return the InetAddress for the host of the URL, or null.
| |||||||||||
Returns a hash code for the URL object.
| |||||||||||
Compares the two urls, and returns true if they have the same host
components.
| |||||||||||
The method is the same as
openConnection(URL u) except
that it uses the proxy to establish a connection to the
URL. | |||||||||||
Establishes a connection to the resource specified by
URL. | |||||||||||
Parse the
stringstr into URL using u's
context. | |||||||||||
Returns true if the urls refer to the same file.
| |||||||||||
This method is deprecated.
use setURL(URL, String String, int, String, String, String,
String, String)
| |||||||||||
Sets the fields of the
URL with the supplied arguments | |||||||||||
Returns the string equivalent of an URL using HTTP parsinf format.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object
| |||||||||||
Compares the two urls, and returns true if they represent the same URL. Two URLs are equal if they have the same file, host, port, protocol, query, and ref components.
| url1 | URL the first URL to compare |
|---|---|
| url2 | URL the second URL to compare |
true if the URLs are the same false
if the URLs are differentReturn the default port.
Return the InetAddress for the host of the URL, or null.
Returns a hash code for the URL object.
Compares the two urls, and returns true if they have the same host components.
true if the hosts of the URLs are the same
false if the hosts are different
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.
| u | java.net.URL |
|---|---|
| proxy | 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. |
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.
| u | java.net.URL |
|---|
| IOException | thrown if an IO error occurs during connection establishment |
|---|
Parse the stringstr into URL using u's
context. URL strings generally have the following format:
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 derived |
| start | int The index in the string from which to begin parsing |
| end | int The index to stop parsing |
Returns true if the urls refer to the same file. Compares the protocol, host, port and file components.
This method is deprecated.use setURL(URL, String String, int, String, String, String, String, String)
Sets the fields of the URL with the supplied arguments
| u | java.net.URL The non-null URL to be set |
|---|---|
| protocol | java.lang.String The protocol |
| host | java.lang.String The host name |
| port | int The port number |
| file | java.lang.String The file component |
| ref | java.lang.String The reference |
Sets the fields of the URL with the supplied arguments
| u | java.net.URL The non-null URL to be set |
|---|---|
| protocol | java.lang.String The protocol |
| host | java.lang.String The host name |
| port | int The port number |
| authority | java.lang.String The authority |
| userInfo | java.lang.String The user info |
| file | java.lang.String The file component |
| query | java.lang.String The query |
| ref | java.lang.String The reference |
Returns the string equivalent of an URL using HTTP parsinf format.
| url | java.net.URL the url object to be processed |
|---|