equals(Object obj) | This method compares this URL for equality with another object. |
getAuthority() | This method gets the authority part of this URL. |
getContent() | This method gets the contents of this URL. |
getContent(Class[] classes) | This method gets the contents of this URL. |
getDefaultPort() | This method gets the default port number of the protocol associated with this URL. |
getFile() | This method gets the file name of this URL. |
getHost() | This method gets the hostname of this URL, if applicable. |
getPath() | This method gets the path part of this URL. |
getPort() | This method gets the port number of this URL. |
getProtocol() | This method gets the protocol name of this URL. |
getQuery() | This method gets the query part of this URL. |
getRef() | This method gets the anchor (also known as the “reference”) of this URL. |
getUserInfo() | This method gets the userInfo part of this URL. |
hashCode() | This method creates an integer suitable for hash table indexing. |
openConnection() | This method returns a URLConnection instance that represents a connection to the remote object referred to by the URL. |
openConnection(Proxy proxy) | Same as openConnection(), except that the connection will be made through the specified proxy; Protocol handlers that do not support proxing will ignore the proxy parameter and make a normal connection. |
openStream() | This method opens a connection to this URL and returns an InputStream for reading from that connection. |
sameFile(URL other) | This method compares two URLs, excluding the fragment component. |
set(String protocol, String host, int port, String file, String ref) | This method sets the fields of the URL. |
set(String protocol, String host, int port, String authority, String userInfo, String path, String query, String ref) | This method sets the specified 8 fields of the URL. |
setURLStreamHandlerFactory(URLStreamHandlerFactory fac) | This method sets an application’s URLStreamHandlerFactory. |
toExternalForm() | This method constructs a string representation of this URL. |
toString() | This method constructs a string representation of this URL. |
toURI() | This method returns a URI equivalent to this URL. |