fix incorrect usages of ByteBuffer.array()

How about just `return Charsets.UTF_8.decode(buf).toString();`. It will work against both array backed ByteBuffer as well as non-array back one.