0

How to set the byte or word alignment using javolution lib. This is like #pragma in CPP.

I am little bit confuse about the byte order. Please suggest me for the byte Order set in the same library.

Jonas
  • 121,568
  • 97
  • 310
  • 388
Kamahire
  • 2,149
  • 3
  • 21
  • 50

1 Answers1

1

As per the Javadoc, you need to add some code to your Struct to indicate what byte order will be used to read/write data:

public class MyStruct extends Struct {
    ... 
    public ByteOrder byteOrder() {
        return ByteOrder.LITTLE_ENDIAN;
    }
}
Gordon
  • 1,210
  • 5
  • 16
  • 23