public class Network extends Object
| Modifier and Type | Method and Description |
|---|---|
static int |
getFreeServerPort() |
static int |
getFreeServerPort(InetAddress hostAdress) |
static int[] |
getFreeServerPorts(InetAddress hostAdress,
int poolSize) |
static InetAddress |
getLocalHost() |
static boolean |
localhostIsIPv6() |
static int |
randomEntryOf(int[] ports) |
public static boolean localhostIsIPv6()
throws UnknownHostException
UnknownHostExceptionpublic static InetAddress getLocalHost() throws UnknownHostException
UnknownHostExceptionpublic static int getFreeServerPort()
throws IOException
IOExceptionpublic static int getFreeServerPort(InetAddress hostAdress) throws IOException
IOExceptionpublic static int randomEntryOf(int[] ports)
public static int[] getFreeServerPorts(InetAddress hostAdress, int poolSize) throws IOException
IOExceptionCopyright © 2018. All Rights Reserved.