Netty的ByteBuf中截取某段字节,再字节数组转二进制string
ByteBuf
创建缓冲区ByteBuf
1、字节数组byte[] bytes,长度为28012.
{16, 113, 109, 0, 0, 1, -128, 0, -86, -67, +28012 more}
2、写入缓冲区内容
//创建缓冲区:
//ridx:0, widx:0, cap:256
ByteBuf binaryBuf = Unpooled.buffer();
if (byte...
原创
2020-03-18 15:17:46 ·
3963 阅读 ·
0 评论