Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Writing unsigned types to a Netty ChannelBuffer

Tags:

java

netty

Netty's ChannelBuffer class provides convenient methods for reading unsigned types from a ChannelBuffer, however there don't appear to be any equivalent methods for writing unsigned types to a ChannelBuffer.

I feel like I must be missing something. What's the recommended approach for say, writing an unsigned integer to a ChannelBuffer?

Thanks!

like image 501
HolySamosa Avatar asked Mar 17 '26 14:03

HolySamosa


1 Answers

If you want to write a 32-bit value its all the same.

channelBuffer.writeInt(my32bitValue);
like image 119
Peter Lawrey Avatar answered Mar 19 '26 02:03

Peter Lawrey



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!