Uniform Resource Locator.
Class URL represents a URL address,
a pointer to a "resource" on the World Wide Web.
Constructor
Creates and returns a new URL, or null if it was invalid.
Methods
Returns the internet address refererred by this URL.
| Returns |
internet address |
| Throws |
UnknownHost -
If specified host is invalid
|
Returns the file name of this URL.
Returns the host name name of this URL, if applicable.
Returns the port number of this URL.
Returns the protocol name this URL.
| Returns |
the protocol name |
Returns the reference (anchor) of this URL.
| Returns |
the reference (anchor) of this URL. |
Opens and returns a connection to this URL.
| Returns |
url connection |
| Throws |
IOError -
If an IO error occured
|
Opens and returns a connection to this URL.
| Returns |
input stream |
| Throws |
IOError -
If an IO error occured
|
Checks if this url is equal to given parameter (excluding the "ref" field).
| Parameters |
url -
the url to compare against.
|
| Returns |
true if they reference the same remote object; false otherwise. |