@Override
    public void close() throws IOException {
        if (!closed) {
            closed = true;
            // clear user data if any
            userData.clear();
            // don't want to hold the last byte array reference for too long
            byteBuffer.reset();
            ClickHouseDataStreamFactory.handleCustomAction(postCloseAction);
        }
    }
Checks if the input stream has been closed or not.

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