VirtualVoid
VirtualVoid

Reputation: 1023

Netty and ByteOrder

Due to poor documentation and lack of experience with Netty, i faced with little problem. I have no clue how can i set a default ByteOrder.

I need a Little-Endian set by default. I'll be glad, if someone will give me some hints about this.

Upvotes: 5

Views: 2079

Answers (1)

Abe
Abe

Reputation: 9031

You could use Bootstrap.setOption() to do this.

    serverBootstrap.setOption("child.bufferFactory", new
HeapChannelBufferFactory(ByteOrder.LITTLE_ENDIAN));
    ... or ...
    clientBootstrap.setOption("bufferFactory", new
HeapChannelBufferFactory(ByteOrder.LITTLE_ENDIAN));

Upvotes: 7

Related Questions