Modifier | Constructor and Description |
---|---|
private |
NTV2Util() |
Modifier and Type | Method and Description |
---|---|
static double |
getDouble(byte[] b,
boolean bigEndian)
Get a double from the first 8 bytes of a byte array,
in either Big Endian or Little Endian format.
|
static float |
getFloat(byte[] b,
boolean bigEndian)
Get a float from the first 4 bytes of a byte array,
in either Big Endian or Little Endian format.
|
static int |
getInt(byte[] b,
boolean bigEndian)
Get an int from the first 4 bytes of a byte array,
in either Big Endian or Little Endian format.
|
static int |
getIntBE(byte[] b,
int i)
Get a Big Endian int from four bytes of a byte array
|
static int |
getIntLE(byte[] b,
int i)
Get a Little Endian int from four bytes of a byte array
|
static boolean |
isNioAvailable()
Does the current VM support the New IO api
|
private NTV2Util()
public static int getIntLE(byte[] b, int i)
b
- the byte arrayi
- the index of the first data byte in the arraypublic static int getIntBE(byte[] b, int i)
b
- the byte arrayi
- the index of the first data byte in the arraypublic static int getInt(byte[] b, boolean bigEndian)
b
- the byte arraybigEndian
- is the byte array Big Endian?public static float getFloat(byte[] b, boolean bigEndian)
b
- the byte arraybigEndian
- is the byte array Big Endian?public static double getDouble(byte[] b, boolean bigEndian)
b
- the byte arraybigEndian
- is the byte array Big Endian?public static boolean isNioAvailable()