@SuppressWarnings("unchecked")
    public SelfT output(ClickHouseOutputStream output) {
        ClickHousePassThruStream stream = ClickHouseChecker.nonNull(output, ClickHouseOutputStream.TYPE_NAME)
                .getUnderlyingStream();
        if (stream.hasOutput()) {
            return output(stream);
        }

        checkSealed();

        this.output = changeProperty(PROP_OUTPUT, this.output,
                ClickHouseDeferredValue.of(output, ClickHouseOutputStream.class));

        return (SelfT) this;
    }
Sets output stream, to which response will be redirected.

@param output non-null output stream
@return the request itself
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseRequest.java