public class NIOHelper extends Object
Constructor | Description |
---|---|
NIOHelper() |
Modifier and Type | Method | Description |
---|---|---|
static ByteBuffer |
blockingRead(SocketChannel so,
long timeout,
byte[] bytes) |
|
static ByteBuffer |
blockingRead(SocketChannel so,
long timeout,
int bytes) |
|
static int |
bytesToInt(byte[] bytes) |
|
static int |
bytesToInt(ByteBuffer b) |
|
static int[] |
bytesToInts(byte[] bytes) |
|
static long |
bytesToLong(byte[] bytes) |
|
static long |
bytesToLong(ByteBuffer b) |
|
static byte[] |
intsToBytes(int[] n) |
|
static byte[] |
intsToBytes(List<Integer> n) |
|
static byte[] |
intToBytes(int n) |
|
static byte[] |
longToBytes(long n) |
public static byte[] intsToBytes(int[] n)
public static int[] bytesToInts(byte[] bytes)
public static byte[] intToBytes(int n)
public static byte[] longToBytes(long n)
public static int bytesToInt(byte[] bytes)
public static long bytesToLong(byte[] bytes)
public static long bytesToLong(ByteBuffer b)
public static int bytesToInt(ByteBuffer b)
public static ByteBuffer blockingRead(SocketChannel so, long timeout, int bytes) throws IOException
IOException
public static ByteBuffer blockingRead(SocketChannel so, long timeout, byte[] bytes) throws IOException
IOException
Copyright © 2018. All rights reserved.