ari*_*ies 8 java bytebuffer netty
如何从netty获取字符串ByteBuf?截至目前,我能够逐字逐句地获得它.有没有办法直接获取字符串对象?
// message is of type ByteBuf
for (int i = 0; i < message.capacity(); i++) {
byte b = message.payload().getByte(i);
System.out.print((char) b);
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
9035 次 |
| 最近记录: |