|
Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-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 boolean |
PreferIPv4Stack The value of system property "java.net.preferIPv4Stack". |
static boolean |
PreferIPv6Addresses The value of system property "java.net.preferIPv6Addresses". |
Constructor Summary | |
---|---|
InetAddressHelper() |
Method Summary | |
---|---|
static List |
getAllLocalAddresses() Return a list of all InetAddress objects bound to all the network interfaces on this machine. |
static InetAddress |
getByAddress(byte[] abAddr) Return an InetAddress object given the raw IP address. |
static InetAddress |
getLocalHost() Obtain the local host address. |
static boolean |
isAnyLocalAddress(InetAddress addr) Deprecated. As of Coherence 3.0, replaced by InetAddress.isAnyLocalAddress() |
static boolean |
isLinkLocalAddress(InetAddress addr) Deprecated. As of Coherence 3.0, replaced by InetAddress.isLinkLocalAddress() |
static boolean |
isLoopbackAddress(InetAddress addr) Deprecated. As of Coherence 3.0, replaced by InetAddress.isLoopbackAddress() |
static boolean |
isSiteLocalAddress(InetAddress addr) Deprecated. As of Coherence 3.0, replaced by InetAddress.isSiteLocalAddress() |
static long |
toLong(InetAddress addr) Converts an IPv4 compatible address to a long value. |
static String |
toString(byte[] ab) Converts a byte array to a raw IP address string representation. |
static String |
toString(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
Constructor Detail |
---|
public InetAddressHelper()
Method Detail |
---|
public static InetAddress getLocalHost() throws UnknownHostException
UnknownHostException
public static List getAllLocalAddresses()
public static boolean isLoopbackAddress(InetAddress addr)
InetAddress.isLoopbackAddress()
addr
- the InetAddresspublic static boolean isAnyLocalAddress(InetAddress addr)
InetAddress.isAnyLocalAddress()
addr
- the InetAddresspublic static boolean isLinkLocalAddress(InetAddress addr)
InetAddress.isLinkLocalAddress()
addr
- the InetAddresspublic static boolean isSiteLocalAddress(InetAddress addr)
InetAddress.isSiteLocalAddress()
addr
- the InetAddresspublic static InetAddress getByAddress(byte[] abAddr) throws UnknownHostException
abAddr
- the raw IP address in network byte orderUnknownHostException
public static boolean virtuallyEqual(byte[] abAddr1, byte[] abAddr2)
abAddr1
- first IP addressabAddr2
- second IP addresspublic static long toLong(InetAddress addr)
addr
- an instance of InetAddress to convert to a longpublic static String toString(byte[] ab)
ab
- the byte array holding the IP addressInetAddress.getHostAddress()
, Inet6Address
public static String toString(InetAddress addr)
addr
- the address for which to format the IP address stringInetAddress.getHostAddress()
, Inet6Address
|
Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |