Java中bytebuffer和string的转换记录
byte[] bytes = k.getBytes( StandardCharsets.UTF_8 );
String v = new String( bytes, StandardCharsets.UTF_8 );
String s = StandardCharsets.UTF_8.decode(byteBuffer).toString();
Java中bytebuffer和string的转换记录
byte[] bytes = k.getBytes( StandardCharsets.UTF_8 );
String v = new String( bytes, StandardCharsets.UTF_8 );
String s = StandardCharsets.UTF_8.decode(byteBuffer).toString();