URIclass GetRawUserInfo() method example. This example shows you how to use GetRawUserInfo() method.This method Returns the raw user-information component of this URI.
URIclass GetRawSchemeSpecificPart() method example. This example shows you how to use GetRawSchemeSpecificPart() method.This method Returns the raw scheme-specific part of this URI.
URIclass GetRawFragment() method example. This example shows you how to use GetRawFragment() method.This method Returns the raw fragment component of this URI.
URIclass GetRawAuthority() method example. This example shows you how to use GetRawAuthority() method.This method Returns the raw authority component of this URI.
URIclass GetFragment() method example. This example shows you how to use GetFragment() method.This method Returns the decoded fragment component of this URI.
URIclass GetAuthority() method example. This example shows you how to use GetAuthority() method.This method Returns the decoded authority component of this URI.
URL class toURI example. public URI toURI() throws URISyntaxException Returns a URI equivalent to this URL. This method functions in the same way as new URI (this.toString()).
URL class toString example. public String toString() Constructs a string representation of this URL. The string is created by calling the toExternalForm method of the stream protocol handler for this object.
URIclass compareTo() method example. This example shows you how to use compareTo() method.This method Compares this URI to another object, which must be a URI.
URL class sameFile example. public boolean sameFile(URL other) Compares two URLs, excluding the fragment component. Returns true if this URL and the other argument are equal without taking the fragment component into consideration.
URL class toExternalForm example. public String toExternalForm() Constructs a string representation of this URL. The string is created by calling the toExternalForm method of the stream protocol handler for this object.
URL class openStream example. public final InputStream openStream() throws IOException Opens a connection to this URL and returns an InputStream for reading from that connection.
URL class openConnection example. public URLConnection openConnection(Proxy proxy) throws IOException 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.
URL class openConnection example. public URLConnection openConnection() throws IOException Returns a URLConnection object that represents a connection to the remote object referred to by the URL.
URL class hashCode example. public int hashCode() Creates an integer suitable for hash table indexing. The hash code is based upon all the URL components relevant for URL comparison. As such, this operation is a blocking operation.