@Override
                    public void onOutput(OutputStream out) throws IOException {
                        byte[] buffer = new byte[writeBufferSize];
                        int bytesRead;
                        while ((bytesRead = data.read(buffer)) > 0) {
                            out.write(buffer, 0, bytesRead);
                        }
                        out.close();
                    }
Sends write request to database. Input data is read from the input stream.

@param tableName - destination table name
@param columnNames - list of column names to insert data into. If null or empty, all columns will be used.
@param data  - data stream to insert
@param format - format of the data in the stream
@param settings - insert operation settings
@return {@code CompletableFuture<InsertResponse>} - a promise to insert response
client-v2/src/main/java/com/clickhouse/client/api/Client.java