java.lang.Object | |
↳ | java.net.URLStreamHandler |
The abstract class URLStreamHandler
is the base for all classes which
can handle the communication with a URL object over a particular protocol
type.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Compares two URL objects whether they represent the same URL.
| |||||||||||
Returns the default port of the protocol used by the handled URL.
| |||||||||||
Returns the host address of the given URL.
| |||||||||||
Returns the hashcode value for the given URL object.
| |||||||||||
Compares two URL objects whether they refer to the same host.
| |||||||||||
Establishes a new connection to the resource specified by the URL
u using the given proxy . | |||||||||||
Establishes a new connection to the resource specified by the URL
u . | |||||||||||
Parses the clear text URL in
str into a URL object. | |||||||||||
Compares two URL objects whether they refer to the same file.
| |||||||||||
This method is deprecated.
use setURL(URL, String String, int, String, String, String,
String, String) instead.
| |||||||||||
Sets the fields of the URL
u to the values of the supplied
arguments. | |||||||||||
Returns the clear text representation of a given URL using HTTP format.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object
|
Compares two URL objects whether they represent the same URL. Two URLs are equal if they have the same file, host, port, protocol, query, and reference components.
url1 | the first URL to compare. |
---|---|
url2 | the second URL to compare. |
true
if the URLs are the same, false
otherwise.Returns the default port of the protocol used by the handled URL. The
current implementation returns always -1
.
Returns the host address of the given URL.
url | the URL object where to read the host address from. |
---|
Returns the hashcode value for the given URL object.
url | the URL to determine the hashcode. |
---|
Compares two URL objects whether they refer to the same host.
url1 | the first URL to be compared. |
---|---|
url2 | the second URL to be compared. |
true
if both URLs refer to the same host, false
otherwise.Establishes a new connection to the resource specified by the URL u
using the given proxy
. Since different protocols also have
unique ways of connecting, it must be overwritten by the subclass.
u | the URL to the resource where a connection has to be opened. |
---|---|
proxy | the proxy that is used to make the connection. |
IOException | if an I/O error occurs during opening the connection. |
---|---|
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 new connection to the resource specified by the URL u
. Since different protocols also have unique ways of connecting, it
must be overwritten by the subclass.
u | the URL to the resource where a connection has to be opened. |
---|
IOException | if an I/O error occurs during opening the connection. |
---|
Parses the clear text URL in str
into a URL object. URL strings
generally have the following format:
http://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 | the URL to fill in the parsed clear text URL parts. |
---|---|
str | the URL string that is to be parsed. |
start | the string position from where to begin parsing. |
end | the string position to stop parsing. |
Compares two URL objects whether they refer to the same file. In the comparison included are the URL components protocol, host, port and file.
url1 | the first URL to be compared. |
---|---|
url2 | the second URL to be compared. |
true
if both URLs refer to the same file, false
otherwise.
This method is deprecated.use setURL(URL, String String, int, String, String, String, String, String) instead.
Sets the fields of the URL u
to the values of the supplied
arguments.
u | the non-null URL object to be set. |
---|---|
protocol | the protocol. |
host | the host name. |
port | the port number. |
file | the file component. |
ref | the reference. |
Sets the fields of the URL u
to the values of the supplied
arguments.
u | the non-null URL object to be set. |
---|---|
protocol | the protocol. |
host | the host name. |
port | the port number. |
authority | the authority. |
userInfo | the user info. |
file | the file component. |
query | the query. |
ref | the reference. |
Returns the clear text representation of a given URL using HTTP format.
url | the URL object to be converted. |
---|