|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.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 InetAddress
public static boolean isAnyLocalAddress(InetAddress addr)
InetAddress.isAnyLocalAddress()
addr
- the InetAddress
public static boolean isLinkLocalAddress(InetAddress addr)
InetAddress.isLinkLocalAddress()
addr
- the InetAddress
public static boolean isSiteLocalAddress(InetAddress addr)
InetAddress.isSiteLocalAddress()
addr
- the InetAddress
public static InetAddress getByAddress(byte[] abAddr) throws UnknownHostException
abAddr
- the raw IP address in network byte order
UnknownHostException
public static boolean virtuallyEqual(byte[] abAddr1, byte[] abAddr2)
abAddr1
- first IP addressabAddr2
- second IP address
public static long toLong(InetAddress addr)
addr
- an instance of InetAddress to convert to a long
public static String toString(byte[] ab)
ab
- the byte array holding the IP address
InetAddress.getHostAddress()
,
Inet6Address
public static String toString(InetAddress addr)
addr
- the address for which to format the IP address string
InetAddress.getHostAddress()
,
Inet6Address
|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |