public void readDataUsingBinaryFormat() {
        log.info("Reading data from table: {}", TABLE_NAME);
        final String sql = "select * from " + TABLE_NAME + " where title <> '' limit 10";

        // Default format is RowBinaryWithNamesAndTypesFormatReader so reader have all information about columns
        try (QueryResponse response = client.query(sql).get(3, TimeUnit.SECONDS);) {

            // Create a reader to access the data in a convenient way
            ClickHouseBinaryFormatReader reader = client.newBinaryFormatReader(response);

            while (reader.hasNext()) {
                reader.next(); // Read the next record from stream and parse it

                // get values
                double id = reader.getDouble("id");
                String title = reader.getString("title");
                String url = reader.getString("url");

                log.info("id: {}, title: {}, url: {}", id, title, url);
            }

            log.info("Data read successfully: {} ms", response.getMetrics().getMetric(ClientMetrics.OP_DURATION).getLong());
        } catch (Exception e) {
            log.error("Failed to read data", e);
        }
        // Response object must be closed to release resources
    }
<p>Example class showing how to read data from ClickHouse server using the new ClickHouse client.</p>
<p>Method {@link Client#query(String, QuerySettings)} returns a {@link Future} for {@link QueryResponse}. The last
one is an object providing access to query results and actual data returned by server. The data is accessible thru
an InputStream what makes it possible to be used with any data reader. Library provides most essential readers.
If response is in well known format like CSV than it is possible to use any 3rd-party library that can read from a stream.
</p>

<p>Readers may be found in the package {@code com.clickhouse.client.api.data_formats}. Here are readers for RowBinary formats:</p>
<ul>
    <li>{@link com.clickhouse.client.api.data_formats.RowBinaryFormatReader}</li>
    <li>{@link com.clickhouse.client.api.data_formats.RowBinaryWithNamesFormatReader}</li>
    <li>{@link com.clickhouse.client.api.data_formats.RowBinaryWithNamesAndTypesFormatReader}</li>
</ul>
examples/client-v2/src/main/java/com/clickhouse/examples/client_v2/SimpleReader.java