public class NIOHelper
extends java.lang.Object
| Constructor and Description |
|---|
NIOHelper() |
| Modifier and Type | Method and Description |
|---|---|
static java.nio.ByteBuffer |
blockingRead(java.nio.channels.SocketChannel so,
long timeout,
byte[] bytes) |
static java.nio.ByteBuffer |
blockingRead(java.nio.channels.SocketChannel so,
long timeout,
int bytes) |
static int |
bytesToInt(byte[] bytes) |
static int |
bytesToInt(java.nio.ByteBuffer b) |
static int[] |
bytesToInts(byte[] bytes) |
static long |
bytesToLong(byte[] bytes) |
static long |
bytesToLong(java.nio.ByteBuffer b) |
static byte[] |
intsToBytes(int[] n) |
static byte[] |
intsToBytes(java.util.List<java.lang.Integer> n) |
static byte[] |
intToBytes(int n) |
static byte[] |
longToBytes(long n) |
public static byte[] intsToBytes(int[] n)
public static byte[] intsToBytes(java.util.List<java.lang.Integer> 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(java.nio.ByteBuffer b)
public static int bytesToInt(java.nio.ByteBuffer b)
public static java.nio.ByteBuffer blockingRead(java.nio.channels.SocketChannel so,
long timeout,
int bytes)
throws java.io.IOException
java.io.IOExceptionpublic static java.nio.ByteBuffer blockingRead(java.nio.channels.SocketChannel so,
long timeout,
byte[] bytes)
throws java.io.IOException
java.io.IOExceptionCopyright © 2014. All Rights Reserved.