I have some data which I'm reading from a Binary File, I see that the data is of unsigned type. How can I read the file in Java to convert it correctly? Right now I'm having to do
byte[] bdata = new byte[DataLen];
Integer.reverseBytes(ByteBuffer.wrap(bdata).getInt(0)) & (-1L >>> 32)
to get the data correctly. Is there a easier way to do it ?