public final class Inet6Address extends InetAddress
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Compares this object against the specified object
|
byte[] |
getAddress()
Returns the raw IP address of this InetAddress object.
|
static Inet6Address |
getByAddress(String host,
byte[] addr,
int scopeId)
Creates a scoped Inet6Address where the scope has an integer id.
|
static Inet6Address |
getByAddress(String host,
byte[] addr,
NetworkInterface nif)
Creates a scoped Inet6Address where the scope is a given
NetworkInterface.
|
String |
getHostAddress()
Returns the IP address string in textual presentation
|
NetworkInterface |
getScopedInterface()
Returns the
NetworkInterface of the address scope
if it is a scoped address and the scope is given in the form of a
NetworkInterface. |
int |
getScopeId()
Returns the scope ID of the address scope if it is a scoped adress using
an integer to identify the scope.
|
int |
hashCode()
Returns a hashcode for this IP address
(The hashcode is independent of scope)
|
boolean |
isAnyLocalAddress()
Utility routine to check if the InetAddress in a wildcard address
|
boolean |
isIPv4CompatibleAddress()
Utility routine to check if the InetAddress is an
IPv4 compatible IPv6 address
|
boolean |
isLinkLocalAddress()
Utility routine to check if the InetAddress is an link local address
|
boolean |
isLoopbackAddress()
Utility routine to check if the InetAddress is a loopback address
|
boolean |
isMCGlobal()
Utility routine to check if the multicast address has global scope
|
boolean |
isMCLinkLocal()
Utility routine to check if the multicast address has link scope
|
boolean |
isMCNodeLocal()
Utility routine to check if the multicast address has node scope
|
boolean |
isMCOrgLocal()
Utility routine to check if the multicast address has organization scope
|
boolean |
isMCSiteLocal()
Utility routine to check if the multicast address has site scope
|
boolean |
isMulticastAddress()
Utility routine to check if the InetAddress is an IP multicast address
|
boolean |
isSiteLocalAddress()
Utility routine to check if the InetAddress is a site local address
|
getAllByName, getByAddress, getByAddress, getByName, getCanonicalHostName, getHostName, getLocalHost, toStringpublic boolean isMulticastAddress()
isMulticastAddress in class InetAddresspublic boolean isAnyLocalAddress()
isAnyLocalAddress in class InetAddresspublic boolean isLoopbackAddress()
isLoopbackAddress in class InetAddresspublic boolean isLinkLocalAddress()
isLinkLocalAddress in class InetAddresspublic boolean isSiteLocalAddress()
isSiteLocalAddress in class InetAddresspublic boolean isMCGlobal()
isMCGlobal in class InetAddresspublic boolean isMCNodeLocal()
isMCNodeLocal in class InetAddresspublic boolean isMCLinkLocal()
isMCLinkLocal in class InetAddresspublic boolean isMCSiteLocal()
isMCSiteLocal in class InetAddresspublic boolean isMCOrgLocal()
isMCOrgLocal in class InetAddresspublic byte[] getAddress()
getAddress in class InetAddresspublic static Inet6Address getByAddress(String host, byte[] addr, int scopeId) throws UnknownHostException
UnkownHostException - if the address is an invalid number of bytes.UnknownHostExceptionpublic static Inet6Address getByAddress(String host, byte[] addr, NetworkInterface nif) throws UnknownHostException
UnkownHostException - if the address is an invalid number of bytes.UnknownHostExceptionpublic NetworkInterface getScopedInterface()
NetworkInterface of the address scope
if it is a scoped address and the scope is given in the form of a
NetworkInterface.
(I.e. the address was created using the
getByAddress(String, byte[], NetworkInterface) method)
Otherwise this method returns null.public int getScopeId()
public String getHostAddress()
getHostAddress in class InetAddresspublic int hashCode()
hashCode in class InetAddressObject.equals(Object),
System.identityHashCode(Object)public boolean equals(Object obj)
equals in class InetAddressobj - The address to test for equalityObject.hashCode()public boolean isIPv4CompatibleAddress()