public class NetworkUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static byte[] |
GOOGLE_DNS_IPV4 |
static byte[] |
GOOGLE_DNS_IPV6 |
static int[] |
IPV4_MULTICAST_ALLOCATION_RANGE |
static long[][] |
IPV6_MULTICAST_ALLOCATION_RANGE |
static long |
SCOPE_GLOBAL_LOCAL |
static long |
SCOPE_IFACE_LOCAL |
static long |
SCOPE_LINK_LOCAL |
static long |
SCOPE_MASK |
static long |
SCOPE_ORG_LOCAL |
static long |
SCOPE_SITE_LOCAL |
Constructor and Description |
---|
NetworkUtils() |
Modifier and Type | Method and Description |
---|---|
static java.net.InetAddress |
getIPv4MulticastGroup(int hash) |
static java.net.InetAddress |
getIPv4MulticastGroup(int hash,
int lowIp,
int highIp) |
static java.net.InetAddress |
getIPv6MulticastGroup(int hash,
long scope) |
static java.net.InetAddress |
getIPv6MulticastGroup(int hash,
long[] lowIp,
long[] highIp,
long scope) |
static long |
getIPv6Scope(java.net.InetAddress ip)
Return IPv6 scope for given IPv6 address.
|
static int |
getLocalIpPingTimeout() |
static int |
getMulticastPort(int hash) |
static boolean |
isIPv4Preferred() |
static boolean |
isIPv6Preferred() |
static boolean |
isReachable(java.net.NetworkInterface iface,
java.net.InetAddress address,
int timeout) |
static boolean |
isUp(java.net.NetworkInterface iface) |
public static byte[] GOOGLE_DNS_IPV4
public static byte[] GOOGLE_DNS_IPV6
public static long SCOPE_IFACE_LOCAL
public static long SCOPE_LINK_LOCAL
public static long SCOPE_SITE_LOCAL
public static long SCOPE_ORG_LOCAL
public static long SCOPE_GLOBAL_LOCAL
public static long SCOPE_MASK
public static int[] IPV4_MULTICAST_ALLOCATION_RANGE
public static long[][] IPV6_MULTICAST_ALLOCATION_RANGE
public static boolean isIPv6Preferred()
public static boolean isIPv4Preferred()
public static java.net.InetAddress getIPv4MulticastGroup(int hash) throws java.net.UnknownHostException
java.net.UnknownHostException
public static java.net.InetAddress getIPv4MulticastGroup(int hash, int lowIp, int highIp) throws java.net.UnknownHostException
java.net.UnknownHostException
public static java.net.InetAddress getIPv6MulticastGroup(int hash, long scope) throws java.net.UnknownHostException
java.net.UnknownHostException
public static java.net.InetAddress getIPv6MulticastGroup(int hash, long[] lowIp, long[] highIp, long scope) throws java.net.UnknownHostException
java.net.UnknownHostException
public static int getMulticastPort(int hash)
public static long getIPv6Scope(java.net.InetAddress ip)
public static boolean isUp(java.net.NetworkInterface iface)
public static boolean isReachable(java.net.NetworkInterface iface, java.net.InetAddress address, int timeout)
public static int getLocalIpPingTimeout()