return new String(data);
return new String(data, charsetName);
    private String getMessageString(ByteBuffer buffer) {        byte[] data = new byte[position - buffer.position()];        buffer.get(data);        return new String(data);    }