code: public boolean flushPipelinedData() throws IOException {
          if (buffer == null || (buffer.getBuffer().position() == 0 && allAreClear(state, FLUSHING))) {
              return next.flush();
          }
          return flushBuffer();
      }
docs: Flushes the cached data.
  <p>
  This should be called when a read thread fails to read any more request data, to make sure that any
  buffered data is flushed after the last pipelined request.
  <p>
  If this returns false the read thread should suspend reads and resume writes
  
  @return <code>true</code> If the flush succeeded, false otherwise
  @throws IOException