Is this a correct approach to convert ByteBuffer to String in this way,
String k = \"abcd\"; ByteBuffer b = ByteBuffer.wrap(k.getBytes()); String v = new Str
There is simpler approach to decode a ByteBuffer into a String without any problems, mentioned by Andy Thomas.
ByteBuffer
String
String s = StandardCharsets.UTF_8.decode(byteBuffer).toString();