简体   繁体   English

如何在netty中读取字符串?

[英]How to read strings in netty?

I have a question about byteBufs and the class ByteBufUtil .我有一个关于byteBufsByteBufUtil类的ByteBufUtil Is it possible to read UTF8 after I wrote it?我写完后可以读取UTF8吗? I already searched on the internet but I haven't found an answer about this topic.我已经在互联网上搜索过,但我还没有找到关于这个话题的答案。

Just use byteBuf.readCharSequence(....) .只需使用byteBuf.readCharSequence(....) This allows you to read strings with different encodings / charsets.这允许您读取具有不同编码/字符集的字符串。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM