public class TypeUtils
extends java.lang.Object
| Constructor and Description |
|---|
TypeUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
intFromBytes(byte b1,
byte b2,
byte b3,
byte b4)
Returns the
int value whose byte representation is the given 4 bytes, in big-endian
order; equivalent to Ints.fromByteArray(new byte[] {b1, b2, b3, b4}). |
static long |
longFromBytes(byte b1,
byte b2,
byte b3,
byte b4,
byte b5,
byte b6,
byte b7,
byte b8)
Returns the
long value whose byte representation is the given 8 bytes, in big-endian
order; equivalent to Longs.fromByteArray(new byte[] {b1, b2, b3, b4, b5, b6, b7, b8}). |
public static long longFromBytes(byte b1,
byte b2,
byte b3,
byte b4,
byte b5,
byte b6,
byte b7,
byte b8)
long value whose byte representation is the given 8 bytes, in big-endian
order; equivalent to Longs.fromByteArray(new byte[] {b1, b2, b3, b4, b5, b6, b7, b8}).public static int intFromBytes(byte b1,
byte b2,
byte b3,
byte b4)
int value whose byte representation is the given 4 bytes, in big-endian
order; equivalent to Ints.fromByteArray(new byte[] {b1, b2, b3, b4}).