@ProviderType
public abstract class IPAddress
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.net.InetAddress |
javaNetAddress |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
byte[] |
getAddress()
Returns the raw IP address of this InetAddress object.
|
static IPAddress |
getByAddress(byte[] addr)
Returns an InetAddress object given the raw IP address.
|
static IPAddress |
getByAddress(int addr) |
java.lang.String |
getHostAddress()
Returns the IP address string in textual presentation.
|
int |
hashCode() |
boolean |
isAnyLocalAddress()
Utility routine to check if the InetAddress in a wildcard 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.}
|
static IPAddress |
parseHostAddress(java.lang.String hostAddress)
Parse a literal representation of an IP address and returns the
corresponding IPAddress class.
|
public static IPAddress getByAddress(byte[] addr) throws java.net.UnknownHostException
addr
- - the raw IP address in network byte orderjava.net.UnknownHostException
public static IPAddress getByAddress(int addr) throws java.net.UnknownHostException
java.net.UnknownHostException
public static IPAddress parseHostAddress(java.lang.String hostAddress) throws java.net.UnknownHostException
hostAddress
- java.net.UnknownHostException
public byte[] getAddress()
public java.lang.String getHostAddress()
public boolean isAnyLocalAddress()
public boolean isLinkLocalAddress()
public boolean isLoopbackAddress()
public boolean isMCGlobal()
public boolean isMCLinkLocal()
public boolean isMCNodeLocal()
public boolean isMCOrgLocal()
public boolean isMCSiteLocal()
public boolean isMulticastAddress()
public boolean isSiteLocalAddress()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object