public final class NetworkUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getLocalAddress(java.lang.String start,
java.lang.String end) |
static int |
getNextAvailablePort()
Get the next available port using ServerSocket(0).
|
static int |
getNextAvailablePort(int[] portList) |
static int |
getNextAvailablePort(int min,
int max,
java.util.Collection<java.lang.Integer> excepted) |
static boolean |
isLocalAddress(java.net.InetAddress addr) |
static boolean |
isLocalAddress(java.lang.String addr) |
public static int getNextAvailablePort()
public static int getNextAvailablePort(int[] portList)
public static int getNextAvailablePort(int min, int max, java.util.Collection<java.lang.Integer> excepted)
public static java.lang.String getLocalAddress(java.lang.String start, java.lang.String end)
public static boolean isLocalAddress(java.lang.String addr)
public static boolean isLocalAddress(java.net.InetAddress addr)