InputStream getInIfOpen() throws IOException {
        InputStream input = in;
        if (input == null)
            throw new IOException("Stream closed");
        return input;
    }
Check to make sure that underlying input stream has not been
nulled out due to close; if not return it;
clients/src/main/java/org/apache/kafka/common/utils/ChunkedBytesStream.java