@Override
    public void close() throws IOException {
        if (closed) {
            return;
        }

        try {
            flush();
        } finally {
            closed = true;
            ClickHouseDataStreamFactory.handleCustomAction(postCloseAction);
        }
    }
Checks if the output stream has been closed or not.

@return true if the output stream has been closed; false otherwise
clickhouse-data/src/main/java/com/clickhouse/data/ClickHouseOutputStream.java