Does Java read integers in little endian or big endian?

后端 未结 8 1725
孤城傲影
孤城傲影 2020-11-27 13:30

I ask because I am sending a byte stream from a C process to Java. On the C side the 32 bit integer has the LSB is the first byte and MSB is the 4th byte.

So my ques

8条回答
  •  日久生厌
    2020-11-27 13:53

    java force indeed big endian : https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-2.html#jvms-2.11

提交回复
热议问题