public final class Serializer
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
getBytes(int value)
Converts a signed int to a byte array.
|
static byte[] |
getBytes(long value)
Converts a signed long to a byte array.
|
static byte[] |
getBytes(short value)
Converts a signed short to a byte array.
|
static byte[] |
getFiveBytes(long value)
Converts the lowest five bytes of an unsigned long to a byte array.
|
static byte[] |
getVariableByteSigned(int value)
Converts a signed int to a variable length byte array.
|
static byte[] |
getVariableByteUnsigned(int value)
Converts an unsigned int to a variable length byte array.
|
public static byte[] getBytes(int value)
value - the int value.public static byte[] getBytes(long value)
value - the long value.public static byte[] getBytes(short value)
value - the short value.public static byte[] getFiveBytes(long value)
value - the long value, must not be negative.public static byte[] getVariableByteSigned(int value)
value - the int value.public static byte[] getVariableByteUnsigned(int value)
value - the int value, must not be negative.