public String asString(Charset charset) {
        if (length < 1) {
            return "";
        }
        return new String(array, position, length, charset != null ? charset : StandardCharsets.UTF_8);
    }
Converts to string using given charset.

@param charset optional charset, null is treated as
               {@link StandardCharsets#UTF_8}
@return non-null string
clickhouse-data/src/main/java/com/clickhouse/data/ClickHouseByteBuffer.java