Usefull ByteBuffer methods are not present in ChannelBuffer
Atra
dhchem at mail.ru
Tue Nov 17 02:26:47 EST 2009
Thomas Bocek wrote:
>
> Hi Atra,
>
> You can use longBitsToDouble(long), doubleToRawLongBits(double value),
> doubleToLongBits(double value), etc. and use putLong()/getLong()
>
> Cheers,
>
> Thomas
>
>
Hi Thomas,
thanks for the usefull hint. Yes, with float and double this will work. With
char it is also possible to do some bits operations (just looking at
ByteBuffer source). But the general idea is to not reinvent the wheel. I'm
pretty sure everyone who deals with some custom protocol needs those methods
and its not good to reinvent the wheel.
Btw may be I should create a feature request in JIRA?
Regards
--
View this message in context: http://n2.nabble.com/Usefull-ByteBuffer-methods-are-not-present-in-ChannelBuffer-tp4000058p4017036.html
Sent from the Netty User Group mailing list archive at Nabble.com.
More information about the netty-users
mailing list