55 * This class represents an Internet Protocol (IP) address.
56 *
57 * <p> An IP address is either a 32-bit or 128-bit unsigned number
58 * used by IP, a lower-level protocol on which protocols like UDP and
59 * TCP are built. The IP address architecture is defined by <a
60 * href="http://www.ietf.org/rfc/rfc790.txt"><i>RFC 790:
61 * Assigned Numbers</i></a>, <a
62 * href="http://www.ietf.org/rfc/rfc1918.txt"> <i>RFC 1918:
63 * Address Allocation for Private Internets</i></a>, <a
64 * href="http://www.ietf.org/rfc/rfc2365.txt"><i>RFC 2365:
65 * Administratively Scoped IP Multicast</i></a>, and <a
66 * href="http://www.ietf.org/rfc/rfc2373.txt"><i>RFC 2373: IP
67 * Version 6 Addressing Architecture</i></a>. An instance of an
68 * InetAddress consists of an IP address and possibly its
69 * corresponding host name (depending on whether it is constructed
70 * with a host name or whether it has already done reverse host name
71 * resolution).
72 *
73 * <h3> Address types </h3>
74 *
75 * <blockquote><table cellspacing=2 summary="Description of unicast and multicast address types">
76 * <tr><th valign=top><i>unicast</i></th>
77 * <td>An identifier for a single interface. A packet sent to
78 * a unicast address is delivered to the interface identified by
79 * that address.
80 *
81 * <p> The Unspecified Address -- Also called anylocal or wildcard
82 * address. It must never be assigned to any node. It indicates the
83 * absence of an address. One example of its use is as the target of
84 * bind, which allows a server to accept a client connection on any
85 * interface, in case the server host has multiple interfaces.
86 *
87 * <p> The <i>unspecified</i> address must not be used as
88 * the destination address of an IP packet.
89 *
90 * <p> The <i>Loopback</i> Addresses -- This is the address
91 * assigned to the loopback interface. Anything sent to this
92 * IP address loops around and becomes IP input on the local
93 * host. This address is often used when testing a
94 * client.</td></tr>
95 * <tr><th valign=top><i>multicast</i></th>
96 * <td>An identifier for a set of interfaces (typically belonging
97 * to different nodes). A packet sent to a multicast address is
98 * delivered to all interfaces identified by that address.</td></tr>
99 * </table></blockquote>
100 *
101 * <h4> IP address scope </h4>
102 *
103 * <p> <i>Link-local</i> addresses are designed to be used for addressing
104 * on a single link for purposes such as auto-address configuration,
105 * neighbor discovery, or when no routers are present.
106 *
107 * <p> <i>Site-local</i> addresses are designed to be used for addressing
108 * inside of a site without the need for a global prefix.
109 *
110 * <p> <i>Global</i> addresses are unique across the internet.
111 *
112 * <h4> Textual representation of IP addresses </h4>
113 *
114 * The textual representation of an IP address is address family specific.
115 *
116 * <p>
117 *
118 * For IPv4 address format, please refer to <A
|
55 * This class represents an Internet Protocol (IP) address.
56 *
57 * <p> An IP address is either a 32-bit or 128-bit unsigned number
58 * used by IP, a lower-level protocol on which protocols like UDP and
59 * TCP are built. The IP address architecture is defined by <a
60 * href="http://www.ietf.org/rfc/rfc790.txt"><i>RFC 790:
61 * Assigned Numbers</i></a>, <a
62 * href="http://www.ietf.org/rfc/rfc1918.txt"> <i>RFC 1918:
63 * Address Allocation for Private Internets</i></a>, <a
64 * href="http://www.ietf.org/rfc/rfc2365.txt"><i>RFC 2365:
65 * Administratively Scoped IP Multicast</i></a>, and <a
66 * href="http://www.ietf.org/rfc/rfc2373.txt"><i>RFC 2373: IP
67 * Version 6 Addressing Architecture</i></a>. An instance of an
68 * InetAddress consists of an IP address and possibly its
69 * corresponding host name (depending on whether it is constructed
70 * with a host name or whether it has already done reverse host name
71 * resolution).
72 *
73 * <h3> Address types </h3>
74 *
75 * <blockquote><table class="borderless">
76 * <caption style="display:none">Description of unicast and multicast address types</caption>
77 * <tbody>
78 * <tr><th valign=top><i>unicast</i></th>
79 * <td>An identifier for a single interface. A packet sent to
80 * a unicast address is delivered to the interface identified by
81 * that address.
82 *
83 * <p> The Unspecified Address -- Also called anylocal or wildcard
84 * address. It must never be assigned to any node. It indicates the
85 * absence of an address. One example of its use is as the target of
86 * bind, which allows a server to accept a client connection on any
87 * interface, in case the server host has multiple interfaces.
88 *
89 * <p> The <i>unspecified</i> address must not be used as
90 * the destination address of an IP packet.
91 *
92 * <p> The <i>Loopback</i> Addresses -- This is the address
93 * assigned to the loopback interface. Anything sent to this
94 * IP address loops around and becomes IP input on the local
95 * host. This address is often used when testing a
96 * client.</td></tr>
97 * <tr><th valign=top><i>multicast</i></th>
98 * <td>An identifier for a set of interfaces (typically belonging
99 * to different nodes). A packet sent to a multicast address is
100 * delivered to all interfaces identified by that address.</td></tr>
101 * </tbody>
102 * </table></blockquote>
103 *
104 * <h4> IP address scope </h4>
105 *
106 * <p> <i>Link-local</i> addresses are designed to be used for addressing
107 * on a single link for purposes such as auto-address configuration,
108 * neighbor discovery, or when no routers are present.
109 *
110 * <p> <i>Site-local</i> addresses are designed to be used for addressing
111 * inside of a site without the need for a global prefix.
112 *
113 * <p> <i>Global</i> addresses are unique across the internet.
114 *
115 * <h4> Textual representation of IP addresses </h4>
116 *
117 * The textual representation of an IP address is address family specific.
118 *
119 * <p>
120 *
121 * For IPv4 address format, please refer to <A
|