code: public synchronized boolean isOpen() {
      if (errorCode != null) {
        return false;
      }
      if ((source.finished || source.closed)
          && (sink.finished || sink.closed)
          && hasResponseHeaders) {
        return false;
      }
      return true;
    }
docs: Returns true if this stream is open. A stream is open until either:
  
  <ul>
  <li>A {@code SYN_RESET} frame abnormally terminates the stream.
  <li>Both input and output streams have transmitted all data and headers.
  </ul>
  
  <p>Note that the input stream may continue to yield data even after a stream reports itself as
  not open. This is because input data is buffered.