Currently, I have a code that's writing type short data to a .dat file using DataOutputStream. From what I understand, Java sends out the bytes as BigEndian, but the output to the file needs be send out as LittleEndian (Intel format) to be able to be read by a software that expects the Intel format.
For example, sending a type short value of 583 appears in TextPad as 0247 (big-endian hex), but I should be seeing 4702 (little-endian hex).
I searched for a solution online and found out about
ByteBuffer. order( ByteOrder.LITTLE_ENDIAN )
I'm not sure how I'm suppose to use this with the example snippet code below or if there are other ways of doing this.
int data = 0;
data = Integer.parseInt(stringData);