Thanks for the response! I figured out how to read my data.
Regarding endianness, ByteBuffer has a method to set endianness aka byte order.
I then use the regular ByteBuffer methods to read the data as signed integers and calculate the intended unsigned values as necessary. Since Scala/Java/JVM assume two’s complement as integer encoding:
if the read value is positive, it is the intended value
if the read value is negative, it is the intended value minus two to the power of the number of bits