There is simpler approach to decode a ByteBuffer
into a String
without any problems, mentioned by Andy Thomas.
String s = StandardCharsets.UTF_8.decode(byteBuffer).toString();
There is simpler approach to decode a ByteBuffer
into a String
without any problems, mentioned by Andy Thomas.
String s = StandardCharsets.UTF_8.decode(byteBuffer).toString();