|
Oracle® Coherence Java API Reference Release 3.6.1.0 E18814-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
com.tangosol.util.Base
com.tangosol.net.InetAddressHelper
public abstract class InetAddressHelper
Helper class that encapsulates common InetAddress functionality.
| Field Summary | |
|---|---|
static java.lang.reflect.Method |
METHOD_GET_MTUMethod for obtaining the MTU from a NetworkInterface in 1.6+ JVMs. |
static boolean |
PreferIPv4StackThe value of system property "java.net.preferIPv4Stack". |
static boolean |
PreferIPv6AddressesThe value of system property "java.net.preferIPv6Addresses". |
| Constructor Summary | |
|---|---|
InetAddressHelper() |
|
| Method Summary | |
|---|---|
static int |
compare(java.net.InetAddress addrA, java.net.InetAddress addrB)Compare two InetAddresses for ordering purposes. |
static java.util.List |
getAllLocalAddresses()Return a list of all InetAddress objects bound to all the network interfaces on this machine. |
static java.util.Map |
getAllLocalMTUs()Return a map of all InetAddress and MTUs bound to all the network interfaces on this machine. |
static java.net.InetAddress |
getByAddress(byte[] abAddr)Return an InetAddress object given the raw IP address. |
static java.net.InetAddress |
getLocalHost()Obtain the local host address. |
static int |
getLocalMTU(java.net.InetAddress addr)Return the MTU for the specified local address. |
static int |
getLocalMTU(java.net.NetworkInterface ni)Return the MTU for the specified NetworkInterface. |
static boolean |
isAnyLocalAddress(java.net.InetAddress addr)Deprecated. As of Coherence 3.0, replaced by InetAddress.isAnyLocalAddress() |
static boolean |
isLinkLocalAddress(java.net.InetAddress addr)Deprecated. As of Coherence 3.0, replaced by InetAddress.isLinkLocalAddress() |
static boolean |
isLoopbackAddress(java.net.InetAddress addr)Deprecated. As of Coherence 3.0, replaced by InetAddress.isLoopbackAddress() |
static boolean |
isSiteLocalAddress(java.net.InetAddress addr)Deprecated. As of Coherence 3.0, replaced by InetAddress.isSiteLocalAddress() |
static long |
toLong(java.net.InetAddress addr)Converts an IPv4 compatible address to a long value. |
static java.lang.String |
toString(byte[] ab)Converts a byte array to a raw IP address string representation. |
static java.lang.String |
toString(java.net.InetAddress addr)Format an IP address string representing the specified InetAddress object. |
static boolean |
virtuallyEqual(byte[] abAddr1, byte[] abAddr2)Compare specified raw IP addresses taking into account IPv4-compatible IPv6 addresses. |
| Field Detail |
|---|
public static final boolean PreferIPv4Stack
public static final boolean PreferIPv6Addresses
public static final java.lang.reflect.Method METHOD_GET_MTU
| Constructor Detail |
|---|
public InetAddressHelper()
| Method Detail |
|---|
public static java.net.InetAddress getLocalHost()
throws java.net.UnknownHostException
java.net.UnknownHostException
public static int compare(java.net.InetAddress addrA,
java.net.InetAddress addrB)
addrA - the first address to compareaddrB - the second address to comparepublic static int getLocalMTU(java.net.InetAddress addr)
addr - the local addresspublic static int getLocalMTU(java.net.NetworkInterface ni)
ni - the network interfacepublic static java.util.List getAllLocalAddresses()
public static java.util.Map getAllLocalMTUs()
@Deprecated
public static boolean isLoopbackAddress(java.net.InetAddress addr)
InetAddress.isLoopbackAddress()addr - the InetAddress
@Deprecated
public static boolean isAnyLocalAddress(java.net.InetAddress addr)
InetAddress.isAnyLocalAddress()addr - the InetAddress
@Deprecated
public static boolean isLinkLocalAddress(java.net.InetAddress addr)
InetAddress.isLinkLocalAddress()addr - the InetAddress
@Deprecated
public static boolean isSiteLocalAddress(java.net.InetAddress addr)
InetAddress.isSiteLocalAddress()addr - the InetAddress
public static java.net.InetAddress getByAddress(byte[] abAddr)
throws java.net.UnknownHostException
abAddr - the raw IP address in network byte orderjava.net.UnknownHostException
public static boolean virtuallyEqual(byte[] abAddr1,
byte[] abAddr2)
abAddr1 - first IP addressabAddr2 - second IP addresspublic static long toLong(java.net.InetAddress addr)
addr - an instance of InetAddress to convert to a longpublic static java.lang.String toString(byte[] ab)
ab - the byte array holding the IP addressInetAddress.getHostAddress(), Inet6Addresspublic static java.lang.String toString(java.net.InetAddress addr)
addr - the address for which to format the IP address stringInetAddress.getHostAddress(), Inet6Address
|
Oracle® Coherence Java API Reference Release 3.6.1.0 E18814-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||