 |
URL(String s)
 |
Constructs a new URL object using s. |
|
 |
URL(String p, String h, int n, String f)
 |
Constructs a new URL object using protocol p, host h, port number n, and file f. |
|
 |
URL(String p, String h, int n, String f, URLStreamHandler u)
 |
Constructs a new URL object using protocol p, host h, port number n, file f,
and handler u. |
|
 |
URL(String p, String h, String f)
 |
Constructs a new URL object using protocol p, host h, and file f. |
|
 |
URL(URL u, String s)
 |
Constructs a new URL object by using s within URL context u. |
|
 |
URL(URL u, String s, URLStreamHandler h)
 |
Constructs a new URL object by using s with handler h within URL context u. |
|
 |
boolean equals(Object v)
 |
Returns true if and only if v is an instance of URL specifying the same Web
resource. |
|
 |
String getAuthority()
 |
Returns the authority of this URL. |
|
 |
Object getContent()
 |
Returns the contents of this URL. |
|
 |
Object getContent(Class[] t)
 |
Returns the first contents of this URL that matches a type in t. |
|
 |
int getDefaultPort()
 |
Returns the default port number of the protocol associated with this URL. |
|
 |
String getFile()
 |
Returns the file name of this URL. |
|
 |
String getHost()
 |
Return the host name of this URL. |
|
 |
String getPath()
 |
Returns the path of this URL. |
|
 |
int getPort()
 |
Returns the port number of this URL. |
|
 |
String getProtocol()
 |
Returns the protocol of this URL. |
|
 |
String getQuery()
 |
Returns the query part of this URL. |
|
 |
String getRef()
 |
Returns the anchor of this URL. |
|
 |
String getUserInfo()
 |
Returns the user information of this URL. |
|
 |
int hashCode()
 |
Returns the hash code of this URL. |
|
 |
URLConnection openConnection()
 |
Returns a URLConnection representing a connection to the Web resource
represented by this URL. |
|
 |
InputStream openStream()
 |
Returns an InputStream for reading the opened connection to this URL. |
|
 |
boolean sameFhile(URL u)
 |
Returns true if this URL is the same as u excluding their fragment components;
otherwise, returns false.
|
|
 |
protected void set(String p, String h, int n, String f, String r)
 |
Sets the protocol, host, port number, file, and internal reference fields
of this URL to respectively p, h, n, f, and r.
|
|
 |
protected void set(String p, String h, int n, String a, String u, String
path, String q, String r)
 |
Sets the protocol, host, port number, authority, user information, file,
query, and internal reference fields of this URL to respectively p, h, n, a,
u, f, q, and r.
|
|
 |
String toExternalForm()
 |
Returns a String representation of the value of this URL.
|
|
 |
String toString()
 |
Returns a String representation of the value of this URL.
|
|