开发者

Struct Javolution Lib Byteorder and Byte alignment

How to set the byte or word alignment usin开发者_C百科g 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.


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;
    }
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜