Package com.diozero.util
Class IOUtil
java.lang.Object
com.diozero.util.IOUtil
public class IOUtil extends Object
-
Field Summary
Fields Modifier and Type Field Description static ByteOrder
DEFAULT_BYTE_ORDER
-
Constructor Summary
Constructors Constructor Description IOUtil()
-
Method Summary
Modifier and Type Method Description static int
asInt(byte b)
Get an unsigned int value from a signed bytestatic short
getShort(ByteBuffer buffer)
static short
getShort(ByteBuffer buffer, ByteOrder order)
static long
getUInt(ByteBuffer buffer)
static long
getUInt(ByteBuffer buffer, int length)
static long
getUInt(ByteBuffer buffer, int length, ByteOrder order)
static long
getUInt(ByteBuffer buffer, ByteOrder order)
static int
getUShort(ByteBuffer buffer)
static int
getUShort(ByteBuffer buffer, ByteOrder order)
-
Field Details
-
DEFAULT_BYTE_ORDER
-
-
Constructor Details
-
IOUtil
public IOUtil()
-
-
Method Details
-
asInt
public static int asInt(byte b)Get an unsigned int value from a signed byte- Parameters:
b
- input value- Returns:
- byte values from -127..128 convert 128..255
-
getShort
-
getShort
-
getUShort
-
getUShort
-
getUInt
-
getUInt
-
getUInt
-
getUInt
-