public final class Bin
extends java.lang.Object
Constructor and Description |
---|
Bin() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
concatBuffers(byte[]... buffers)
Creates and returns a bytes buffer containing the concatenated passed buffers.
|
static int |
dWordToInt(byte[] bytes)
Returns a integer (int) interpreted from a 4 bytes buffer considering Little Endian representation.
|
static byte[] |
intToDWord(int i)
Creates and returns a 4 bytes buffer containing the Little Endian representation of the integer
|
static byte[] |
intToWord(int i)
Creates and returns a 2 bytes buffer containing the Little Endian representation of the integer
|
static byte[] |
longToQWord(long i)
Creates and returns a 8 bytes buffer containing the Little Endian representation of the long
|
static long |
qWordToLong(byte[] bytes)
Returns a integer (long) interpreted from a 8 bytes buffer (quadWord) considering Little Endian representation.
|
static int |
wordToInt(byte[] bytes)
Returns a integer (int) interpreted from a 2 bytes buffer considering Little Endian representation.
|
public static byte[] concatBuffers(byte[]... buffers)
buffers
- ,some byte arrayspublic static int dWordToInt(byte[] bytes)
bytes
- public static byte[] intToDWord(int i)
i
- , the integer to convertpublic static byte[] intToWord(int i)
i
- , the integer to convertpublic static byte[] longToQWord(long i)
i
- , the long to convertpublic static long qWordToLong(byte[] bytes)
bytes
- public static int wordToInt(byte[] bytes)
bytes
-