docs: @Override
      @FFDCIgnore({ IOException.class })
      public void flushBuffers() throws IOException {
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
              Tr.debug(tc, "Flushing buffers: " + this);
          }
  
          if (this.isc.getResponse() == null) {
              IOException x = new IOException("response Object(s) (e.g. getObjectFactory()) are null");
              throw x;
          }
  
          if (!this.isc.getResponse().isCommitted()) {
              if (obs != null && !this.WCheadersWritten) {
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                      Tr.debug(tc, "obs  ->" + obs);
                  }
                  obs.alertOSFirstFlush();
              }
  
              this.isc.getResponse().setCommitted();
          }
  
          if (this.ignoreFlush) {
              this.ignoreFlush = false;
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                  Tr.debug(tc, "Ignoring first flush attempt");
              }
              return;
          }
  
          final boolean writingBody = (hasBufferedContent());
          // flip the last buffer for the write...
          if (writingBody && null != this.output[this.outputIndex]) {
              this.output[this.outputIndex].flip();
          }
          try {
              WsByteBuffer[] content = (writingBody) ? this.output : null;
              if (isClosed() || this.isClosing) {
                  if (!hasFinished) { //if we've already called finishResponseMessage - don't call again
                      // on a closed stream, use the final write api
                      this.isc.finishResponseMessage(content);
                      this.isClosing = false;
                      this.hasFinished = true;
                  }
              } else {
                  // else use the partial body api
                  this.isc.sendResponseBody(content);
              }
          } catch (MessageSentException mse) {
              FFDCFilter.processException(mse, getClass().getName(),
                                          "flushBuffers", new Object[] { this, this.isc });
              if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                  Tr.event(tc, "Invalid state, message-sent-exception received; " + this.isc);
              }
              this.error = new IOException("Invalid state");
              throw this.error;
          } catch (IOException ioe) {
              // no FFDC required
              this.error = ioe;
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                  Tr.debug(tc, "Received exception during write: " + ioe);
              }
              Throwable th = ioe.getCause();
              if (th instanceof FlowControlException || th instanceof StreamClosedException) {
                  // http/2 stream write failed - we don't want to pass this back up to FFDC
                  Tr.debug(tc, "HTTP/2 stream could not write; setting error on this output stream");
                  return;
              }
              throw ioe;
          } finally {
              this.bytesWritten += this.bufferedCount;
              if (this.contentLengthSet) {
                  this.bytesRemaining -= this.bufferedCount;
              }
              this.bufferedCount = 0;
              this.outputIndex = 0;
              // Note: this logic only works for sync writes
              if (writingBody) {
                  this.output[0].clear();
                  for (int i = 1; i < this.output.length; i++) {
                      if (null != this.output[i]) {
                          // mark them empty so later writes don't mistake them
                          // as having content
                          this.output[i].position(0);
                          this.output[i].limit(0);
                      }
                  }
              }
          }
      }