public class Utils extends Object
| Constructor and Description |
|---|
Utils() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
bytes(ByteBuffer buf) |
static boolean |
delete(File path) |
static int |
generate_random() |
static byte[] |
realloc(byte[] src,
int size) |
static <T> T[] |
realloc(Class<T> klass,
T[] src,
int size,
boolean ended) |
static <T> void |
swap(List<T> items,
int index1_,
int index2_) |
static void |
tune_tcp_keepalives(SocketChannel ch,
int tcp_keepalive,
int tcp_keepalive_cnt,
int tcp_keepalive_idle,
int tcp_keepalive_intvl) |
static void |
tune_tcp_keepalives(Socket fd,
int tcp_keepalive,
int tcp_keepalive_cnt,
int tcp_keepalive_idle,
int tcp_keepalive_intvl) |
static void |
tune_tcp_socket(Socket fd) |
static void |
tune_tcp_socket(SocketChannel ch) |
static void |
unblock_socket(SelectableChannel s) |
public static int generate_random()
public static void tune_tcp_socket(SocketChannel ch) throws SocketException
SocketExceptionpublic static void tune_tcp_socket(Socket fd) throws SocketException
SocketExceptionpublic static void tune_tcp_keepalives(SocketChannel ch, int tcp_keepalive, int tcp_keepalive_cnt, int tcp_keepalive_idle, int tcp_keepalive_intvl) throws SocketException
SocketExceptionpublic static void tune_tcp_keepalives(Socket fd, int tcp_keepalive, int tcp_keepalive_cnt, int tcp_keepalive_idle, int tcp_keepalive_intvl) throws SocketException
SocketExceptionpublic static void unblock_socket(SelectableChannel s) throws IOException
IOExceptionpublic static <T> T[] realloc(Class<T> klass, T[] src, int size, boolean ended)
public static <T> void swap(List<T> items, int index1_, int index2_)
public static byte[] bytes(ByteBuffer buf)
public static byte[] realloc(byte[] src,
int size)
public static boolean delete(File path)
Copyright © 2014. All rights reserved.