public abstract class GridClientByteUtils extends Object
| Constructor and Description |
|---|
GridClientByteUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
bytesToInt(byte[] bytes,
int off)
Constructs
int from byte array. |
static long |
bytesToLong(byte[] bytes,
int off)
Constructs
long from byte array. |
static short |
bytesToShort(byte[] bytes,
int off)
Constructs
short from byte array. |
static UUID |
bytesToUuid(byte[] bytes,
int off)
Constructs
UUID from byte array. |
static byte[] |
intToBytes(int i)
Converts primitive
int type to byte array. |
static int |
intToBytes(int i,
byte[] bytes,
int off)
Converts primitive
int type to byte array and stores it in specified
byte array. |
static byte[] |
longToBytes(long l)
Converts primitive
long type to byte array. |
static int |
longToBytes(long l,
byte[] bytes,
int off)
Converts primitive
long type to byte array and stores it in specified
byte array. |
static byte[] |
shortToBytes(short s)
Converts primitive
short type to byte array. |
static int |
shortToBytes(short s,
byte[] bytes,
int off)
Converts primitive
short type to byte array and stores it in specified
byte array. |
static byte[] |
uuidToBytes(UUID uuid)
Converts an UUID to byte array.
|
static int |
uuidToBytes(UUID uuid,
byte[] bytes,
int off)
Converts
UUID type to byte array and stores it in specified byte array. |
public static byte[] shortToBytes(short s)
short type to byte array.s - Short value.public static byte[] intToBytes(int i)
int type to byte array.i - Integer value.public static byte[] longToBytes(long l)
long type to byte array.l - Long value.public static int shortToBytes(short s,
byte[] bytes,
int off)
short type to byte array and stores it in specified
byte array.s - Short value.bytes - Array of bytes.off - Offset in bytes array.bytes array.public static int intToBytes(int i,
byte[] bytes,
int off)
int type to byte array and stores it in specified
byte array.i - Integer value.bytes - Array of bytes.off - Offset in bytes array.bytes array.public static int longToBytes(long l,
byte[] bytes,
int off)
long type to byte array and stores it in specified
byte array.l - Long value.bytes - Array of bytes.off - Offset in bytes array.bytes array.public static byte[] uuidToBytes(UUID uuid)
uuid - UUID value.UUID.public static int uuidToBytes(UUID uuid, byte[] bytes, int off)
UUID type to byte array and stores it in specified byte array.uuid - UUID to convert.bytes - Array of bytes.off - Offset in bytes array.bytes array.public static short bytesToShort(byte[] bytes,
int off)
short from byte array.bytes - Array of bytes.off - Offset in bytes array.public static int bytesToInt(byte[] bytes,
int off)
int from byte array.bytes - Array of bytes.off - Offset in bytes array.public static long bytesToLong(byte[] bytes,
int off)
long from byte array.bytes - Array of bytes.off - Offset in bytes array.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.9.1 Release Date : December 9 2020