Java中bytebuffer和string的转换记录
原文地址:https://stackoverflow.com/questions/17354891/java-bytebuffer-to-string
byte[] bytes = k.getBytes( StandardCharsets.UTF_8 );
String v = new String( bytes, StandardCharsets.UTF_8 );
String s = StandardCharsets.UTF_8.decode(byteBuffer).toString();
...
转载
2020-06-08 16:16:43 ·
996 阅读 ·
0 评论