src/share/classes/java/net/URI.java

Print this page




 440  * content of the instance.  In other words, a URI instance is little more than
 441  * a structured string that supports the syntactic, scheme-independent
 442  * operations of comparison, normalization, resolution, and relativization.
 443  *
 444  * <p> An instance of the {@link URL} class, by contrast, represents the
 445  * syntactic components of a URL together with some of the information required
 446  * to access the resource that it describes.  A URL must be absolute, that is,
 447  * it must always specify a scheme.  A URL string is parsed according to its
 448  * scheme.  A stream handler is always established for a URL, and in fact it is
 449  * impossible to create a URL instance for a scheme for which no handler is
 450  * available.  Equality and hashing depend upon both the scheme and the
 451  * Internet address of the host, if any; comparison is not defined.  In other
 452  * words, a URL is a structured string that supports the syntactic operation of
 453  * resolution as well as the network I/O operations of looking up the host and
 454  * opening a connection to the specified resource.
 455  *
 456  *
 457  * @author Mark Reinhold
 458  * @since 1.4
 459  *
 460  * @see <a href="http://ietf.org/rfc/rfc2279.txt"><i>RFC&nbsp;2279: UTF-8, a
 461  * transformation format of ISO 10646</i></a>, <br><a
 462  * href="http://www.ietf.org/rfc/rfc2373.txt"><i>RFC&nbsp;2373: IPv6 Addressing
 463  * Architecture</i></a>, <br><a
 464  * href="http://www.ietf.org/rfc/rfc2396.txt"><i>RFC&nbsp;2396: Uniform
 465  * Resource Identifiers (URI): Generic Syntax</i></a>, <br><a
 466  * href="http://www.ietf.org/rfc/rfc2732.txt"><i>RFC&nbsp;2732: Format for
 467  * Literal IPv6 Addresses in URLs</i></a>, <br><a
 468  * href="URISyntaxException.html">URISyntaxException</a>
 469  */
 470 
 471 public final class URI
 472     implements Comparable<URI>, Serializable
 473 {
 474 
 475     // Note: Comments containing the word "ASSERT" indicate places where a
 476     // throw of an InternalError should be replaced by an appropriate assertion
 477     // statement once asserts are enabled in the build.
 478 
 479     static final long serialVersionUID = -6052424284110960213L;
 480 




 440  * content of the instance.  In other words, a URI instance is little more than
 441  * a structured string that supports the syntactic, scheme-independent
 442  * operations of comparison, normalization, resolution, and relativization.
 443  *
 444  * <p> An instance of the {@link URL} class, by contrast, represents the
 445  * syntactic components of a URL together with some of the information required
 446  * to access the resource that it describes.  A URL must be absolute, that is,
 447  * it must always specify a scheme.  A URL string is parsed according to its
 448  * scheme.  A stream handler is always established for a URL, and in fact it is
 449  * impossible to create a URL instance for a scheme for which no handler is
 450  * available.  Equality and hashing depend upon both the scheme and the
 451  * Internet address of the host, if any; comparison is not defined.  In other
 452  * words, a URL is a structured string that supports the syntactic operation of
 453  * resolution as well as the network I/O operations of looking up the host and
 454  * opening a connection to the specified resource.
 455  *
 456  *
 457  * @author Mark Reinhold
 458  * @since 1.4
 459  *
 460  * @see <a href="http://www.ietf.org/rfc/rfc2279.txt"><i>RFC&nbsp;2279: UTF-8, a
 461  * transformation format of ISO 10646</i></a>, <br><a
 462  * href="http://www.ietf.org/rfc/rfc2373.txt"><i>RFC&nbsp;2373: IPv6 Addressing
 463  * Architecture</i></a>, <br><a
 464  * href="http://www.ietf.org/rfc/rfc2396.txt"><i>RFC&nbsp;2396: Uniform
 465  * Resource Identifiers (URI): Generic Syntax</i></a>, <br><a
 466  * href="http://www.ietf.org/rfc/rfc2732.txt"><i>RFC&nbsp;2732: Format for
 467  * Literal IPv6 Addresses in URLs</i></a>, <br><a
 468  * href="URISyntaxException.html">URISyntaxException</a>
 469  */
 470 
 471 public final class URI
 472     implements Comparable<URI>, Serializable
 473 {
 474 
 475     // Note: Comments containing the word "ASSERT" indicate places where a
 476     // throw of an InternalError should be replaced by an appropriate assertion
 477     // statement once asserts are enabled in the build.
 478 
 479     static final long serialVersionUID = -6052424284110960213L;
 480