1.读取ByteBuf之后的转换
在channelRead(ChannelHandlerContext ctx,Object msg)函数中,
a.转换成String
ByteBuf in=(ByteBuf)msg;
String conv=in.toString(CharsetUtil.US_ASCII);
说明:ByteBuf 中toString的作用:
Decodes this buffer‘s readable bytes into a string with the specified
* character set name. US_ASCII,UTF_8等值