public final class Inet6Address extends InetAddress implements Serializable
Modifier and Type | Method and Description |
---|---|
byte[] |
getAddress()
Returns the raw IP address of this InetAddress object
|
String |
getCanonicalHostName()
Returns the fully qualified hostname corresponding to this IP address.
|
String |
getHostAddress()
Returns IP address 'xxx.xxx.xxx.xxx'
|
boolean |
isAnyLocalAddress()
Returns whether this is a wildcard address or not.
|
boolean |
isIPvCompatibleAddress() |
boolean |
isLinkLocalAddress()
Returns whether this address is a link-local address or not.
|
boolean |
isLoopbackAddress()
Returns whether this address is a loopback address or not.
|
boolean |
isMCGlobal()
Returns whether this address is a global multicast address or not.
|
boolean |
isMCLinkLocal()
Returns whether this address is a link-local multicast address or not.
|
boolean |
isMCNodeLocal()
Returns whether this address is a node-local multicast address or not.
|
boolean |
isMCOrgLocal()
Returns whether this address is a organization-local multicast address or
not.
|
boolean |
isMCSiteLocal()
Returns whether this address is a site-local multicast address or not.
|
boolean |
isMulticastAddress()
Checks if the InetAddress is a multicast address
IP Multicast Addresses (Class D) range from 224.0.0.0 to 239.255.255.255
|
boolean |
isSiteLocalAddress()
Returns whether this address is a site-local address or not.
|
String |
toString()
InetAddress -> String conversion
|
equals, getAllByName, getByAddress, getByAddress, getByName, getHostName, getLocalHost, hashCode
public byte[] getAddress()
InetAddress
getAddress
in class InetAddress
public boolean isMulticastAddress()
InetAddress
isMulticastAddress
in class InetAddress
public String getCanonicalHostName()
InetAddress
getCanonicalHostName
in class InetAddress
public boolean isAnyLocalAddress()
InetAddress
false
.isAnyLocalAddress
in class InetAddress
true
if this instance represents a wildcard address,
false
otherwise.public boolean isLinkLocalAddress()
InetAddress
false
.
Valid IPv6 link-local addresses are FE80::0 through to FEBF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF.
There are no valid IPv4 link-local addresses.
isLinkLocalAddress
in class InetAddress
true
if this instance represents a link-local address,
false
otherwise.public boolean isLoopbackAddress()
InetAddress
false
. Valid IPv4 loopback
addresses are 127.d.d.d The only valid IPv6 loopback address is ::1.isLoopbackAddress
in class InetAddress
true
if this instance represents a loopback address,
false
otherwise.public boolean isMCGlobal()
InetAddress
false
.
Valid IPv6 link-global multicast addresses are FFxE:/112 where x is a set of flags, and the additional 112 bits make up the global multicast address space.
Valid IPv4 global multicast addresses are between: 224.0.1.0 to 238.255.255.255.
isMCGlobal
in class InetAddress
true
if this instance represents a global multicast
address, false
otherwise.public boolean isMCLinkLocal()
InetAddress
false
.
Valid IPv6 link-local multicast addresses are FFx2:/112 where x is a set of flags, and the additional 112 bits make up the link-local multicast address space.
Valid IPv4 link-local addresses are between: 224.0.0.0 to 224.0.0.255
isMCLinkLocal
in class InetAddress
true
if this instance represents a link-local multicast
address, false
otherwise.public boolean isMCNodeLocal()
InetAddress
false
.
Valid IPv6 node-local multicast addresses are FFx1:/112 where x is a set of flags, and the additional 112 bits make up the node-local multicast address space.
There are no valid IPv4 node-local multicast addresses.
isMCNodeLocal
in class InetAddress
true
if this instance represents a node-local multicast
address, false
otherwise.public boolean isMCOrgLocal()
InetAddress
false
.
Valid IPv6 organization-local multicast addresses are FFx8:/112 where x is a set of flags, and the additional 112 bits make up the organization-local multicast address space.
Valid IPv4 organization-local addresses are between: 239.192.0.0 to 239.251.255.255
isMCOrgLocal
in class InetAddress
true
if this instance represents a organization-local
multicast address, false
otherwise.public boolean isMCSiteLocal()
InetAddress
false
.
Valid IPv6 site-local multicast addresses are FFx5:/112 where x is a set of flags, and the additional 112 bits make up the site-local multicast address space.
Valid IPv4 site-local addresses are between: 239.252.0.0 to 239.255.255.255
isMCSiteLocal
in class InetAddress
true
if this instance represents a site-local multicast
address, false
otherwise.public boolean isSiteLocalAddress()
InetAddress
false
.
Valid IPv6 site-local addresses are FEC0::0 through to FEFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF.
There are no valid IPv4 site-local addresses.
isSiteLocalAddress
in class InetAddress
true
if this instance represents a site-local address,
false
otherwise.public boolean isIPvCompatibleAddress()
public String getHostAddress()
InetAddress
getHostAddress
in class InetAddress
public String toString()
InetAddress
toString
in class InetAddress