Package org.cybergarage.net
Class HostInterface
java.lang.Object
org.cybergarage.net.HostInterface
public class HostInterface extends Object
-
Field Summary
Fields Modifier and Type Field Description static intIPV4_BITMASKstatic intIPV6_BITMASKstatic intLOCAL_BITMASKstatic booleanUSE_LOOPBACK_ADDRstatic booleanUSE_ONLY_IPV4_ADDRstatic booleanUSE_ONLY_IPV6_ADDR -
Constructor Summary
Constructors Constructor Description HostInterface() -
Method Summary
Modifier and Type Method Description static StringgetHostAddress(int n)static StringgetHostURL(String host, int port, String uri)static InetAddress[]getInetAddress(int ipfilter, String[] interfaces)static StringgetInterface()static StringgetIPv4Address()static StringgetIPv6Address()static intgetNHostAddresses()static booleanhasIPv4Addresses()static booleanhasIPv6Addresses()static booleanisIPv4Address(String host)static booleanisIPv6Address(String host)static voidsetInterface(String ifaddr)
-
Field Details
-
USE_LOOPBACK_ADDR
public static boolean USE_LOOPBACK_ADDR -
USE_ONLY_IPV4_ADDR
public static boolean USE_ONLY_IPV4_ADDR -
USE_ONLY_IPV6_ADDR
public static boolean USE_ONLY_IPV6_ADDR -
IPV4_BITMASK
public static final int IPV4_BITMASK- See Also:
- Constant Field Values
-
IPV6_BITMASK
public static final int IPV6_BITMASK- See Also:
- Constant Field Values
-
LOCAL_BITMASK
public static final int LOCAL_BITMASK- See Also:
- Constant Field Values
-
-
Constructor Details
-
HostInterface
public HostInterface()
-
-
Method Details
-
setInterface
-
getInterface
-
getNHostAddresses
public static final int getNHostAddresses() -
getInetAddress
- Parameters:
ipfilter-interfaces-- Returns:
- InetAddress[]
- Since:
- 1.8.0
-
getHostAddress
-
isIPv6Address
-
isIPv4Address
-
hasIPv4Addresses
public static final boolean hasIPv4Addresses() -
hasIPv6Addresses
public static final boolean hasIPv6Addresses() -
getIPv4Address
-
getIPv6Address
-
getHostURL
-