public final class NetUtil extends Object
Modifier and Type | Field and Description |
---|---|
static InetAddress |
LOCALHOST
The
InetAddress that represents the loopback address. |
static Inet4Address |
LOCALHOST4
The
Inet4Address that represents the IPv4 loopback address '127.0.0.1' |
static Inet6Address |
LOCALHOST6
The
Inet6Address that represents the IPv6 loopback address '::1' |
static NetworkInterface |
LOOPBACK_IF
The loopback
NetworkInterface of the current machine |
static int |
SOMAXCONN
The SOMAXCONN value of the current machine.
|
Modifier and Type | Method and Description |
---|---|
static byte[] |
createByteArrayFromIpAddressString(String ipAddressString)
Creates an byte[] based on an ipAddressString.
|
static boolean |
isValidIp4Word(String word) |
static boolean |
isValidIpV4Address(String value)
Takes a string and parses it to see if it is a valid IPV4 address.
|
static boolean |
isValidIpV6Address(String ipAddress) |
public static final Inet4Address LOCALHOST4
Inet4Address
that represents the IPv4 loopback address '127.0.0.1'public static final Inet6Address LOCALHOST6
Inet6Address
that represents the IPv6 loopback address '::1'public static final InetAddress LOCALHOST
InetAddress
that represents the loopback address. If IPv6 stack is available, it will refer to
LOCALHOST6
. Otherwise, LOCALHOST4
.public static final NetworkInterface LOOPBACK_IF
NetworkInterface
of the current machinepublic static final int SOMAXCONN
public static byte[] createByteArrayFromIpAddressString(String ipAddressString)
public static boolean isValidIpV6Address(String ipAddress)
public static boolean isValidIp4Word(String word)
public static boolean isValidIpV4Address(String value)
Copyright © 2008–2018 The Netty Project. All rights reserved.