java.lang.Object | ||
↳ | java.net.InetAddress | |
↳ | java.net.Inet6Address |
An IPv6 address. See InetAddress
.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs an IPv6 address according to the given
host , addr and scope_id . | |||||||||||
Gets an IPv6 address instance according to the given
host ,
addr and nif . | |||||||||||
Gets the scope id as a number if this address is linked to an interface.
| |||||||||||
Gets the network interface if this address is instanced with a scoped
network interface.
| |||||||||||
Returns whether this address is a unspecified wildcard address "::" or
not.
| |||||||||||
Returns whether this address is IPv4 compatible or not.
| |||||||||||
Returns whether this address is a link-local address or not.
| |||||||||||
Returns whether this address is the loopback address or not.
| |||||||||||
Returns whether this address is a global multicast address or not.
| |||||||||||
Returns whether this address is a link-local multicast address or not.
| |||||||||||
Returns whether this address is a node-local multicast address or not.
| |||||||||||
Returns whether this address is a organization-local multicast address or
not.
| |||||||||||
Returns whether this address is a site-local multicast address or not.
| |||||||||||
Returns whether this address is an IP multicast address or not.
| |||||||||||
Returns whether this address is a site-local address or not.
| |||||||||||
Returns a string containing a concise, human-readable description of this
IP address.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.net.InetAddress
| |||||||||||
From class
java.lang.Object
|
Constructs an IPv6 address according to the given host
, addr
and scope_id
.
host | the host name associated with the address. |
---|---|
addr | the network address. |
scope_id | the scope id for link- or site-local addresses. |
UnknownHostException | if the address is null or has an invalid length. |
---|
Gets an IPv6 address instance according to the given host
,
addr
and nif
. scope_id
is set according to the
given nif
and the addr
type (for example site-local or
link-local).
host | the hostname associated with the address. |
---|---|
addr | the network address. |
nif | the network interface that this address is associated with. |
UnknownHostException | if the address is null or has an invalid length or
the interface doesn't have a numeric scope id for the given
address type.
|
---|
Gets the scope id as a number if this address is linked to an interface.
Otherwise returns 0
.
Gets the network interface if this address is instanced with a scoped
network interface. Otherwise returns null
.
Returns whether this address is a unspecified wildcard address "::" or not.
true
if this instance represents a wildcard address,
false
otherwise.
Returns whether this address is IPv4 compatible or not. An IPv4 compatible address is prefixed with 96 bits of 0's. The last 32-bits are varied corresponding with the 32-bit IPv4 address space.
true
if this instance represents an IPv4 compatible
address, false
otherwise.
Returns whether this address is a link-local address or not. A valid IPv6 link-local address is prefixed with 1111111010.
true
if this instance represents a link-local address,
false
otherwise.
Returns whether this address is the loopback address or not. The only valid IPv6 loopback address is "::1".
true
if this instance represents the loopback address,
false
otherwise.
Returns whether this address is a global multicast address or not. A valid IPv6 global multicast address is 11111111xxxx1110 or FF0E hex.
true
if this instance represents a global multicast
address, false
otherwise.
Returns whether this address is a link-local multicast address or not. A valid IPv6 link-local multicast address is prefixed with 11111111xxxx0010.
true
if this instance represents a link-local multicast
address, false
otherwise.
Returns whether this address is a node-local multicast address or not. A valid IPv6 node-local multicast address is prefixed with 11111111xxxx0001.
true
if this instance represents a node-local multicast
address, false
otherwise.
Returns whether this address is a organization-local multicast address or not. A valid IPv6 org-local multicast address is prefixed with 11111111xxxx1000.
true
if this instance represents a org-local multicast
address, false
otherwise.
Returns whether this address is a site-local multicast address or not. A valid IPv6 site-local multicast address is prefixed with 11111111xxxx0101.
true
if this instance represents a site-local multicast
address, false
otherwise.
Returns whether this address is an IP multicast address or not. Valid IPv6 multicast addresses are binary prefixed with 11111111 or FF (hex).
true
if this address is in the multicast group, false
otherwise.
Returns whether this address is a site-local address or not. A valid IPv6 site-local address is prefixed with 1111111011.
true
if this instance represents a site-local address,
false
otherwise.
Returns a string containing a concise, human-readable description of this IP address.