To convert a Netty ChannelBuffer to a String is as simple as calling .toString(UTF_8) on the ChannelBuffer. How do I create a ChannelBuffer from a String?
Use ChannelBuffers.copiedBuffer(String, Charset)
In netty 4 you can use Unpooled.copiedBuffer(String, Charset)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With