The result you observe is suitable for a small-end machine. I suspect that if you run the following, you will get a LITTLE_ENDIAN answer.
ByteBuffer bb = ByteBuffer.wrap(new byte[] { 0, 0, 0, -34 }); System.out.println(bb.order());
If you want to force a large size for your buffer, do the following:
ByteBuffer bb = ByteBuffer.wrap(new byte[] { 0, 0, 0, -34 }); bb.order(ByteOrder.BIG_ENDIAN); System.out.println(bb.order()); System.out.println(bb.getInt( ));
Must print:
BIG_ENDIAN 222
source share