Flush the output array of buffers to the network below.

@throws IOException
164165
@FFDCIgnore({ IOException.class })
    private void flushUpgradedOutputBuffers() throws IOException {

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "flushUpgraded: Flushing buffers for Upgraded output: " + this);
        }
        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;
            // write it out to TCP            
            if(content != null) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "flushUpgraded:: Now write the content ");
                }
                _tcpContext.getWriteInterface().setBuffers(content);
                _tcpContext.getWriteInterface().write(TCPWriteRequestContext.WRITE_ALL_DATA, WCCustomProperties31.UPGRADE_WRITE_TIMEOUT);
            }
            else{
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "flushUpgraded: No more data to flush ");
                } 
            }

        } catch (IOException ioe) {
            this.error = ioe;
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "flushUpgraded: Received exception during write: " + ioe);
            }
            throw ioe;
        } finally {
            this.bytesWritten += this.bufferedCount;            
            this.bufferedCount = 0;
            this.outputIndex = 0;
            // Note: this logic only works for sync writes
            if (writingBody) {
                if (null != this._output){
                    if (null != this._output[0]) {
                        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);
                        }
                    }
                }
            }
            // disconnect write buffers in TCP when done
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "flushUpgraded: disconnect write buffers in TCP when done");
            }
            _tcpContext.getWriteInterface().setBuffers(null);
        }
    }
440553
public void flush()
        throws IOException
    {
        try
        {
            if (!_commited)
            {
                _commited=true;
                if (_commitObserver!=null)
                    _commitObserver.outputNotify(this,OutputObserver.__COMMITING,null);
            }
            
            wrapBuffer();
            
            // Add headers
            if (_httpMessageWriter.size()>0)
            {
                prewrite(_httpMessageWriter.getBuf(),0,_httpMessageWriter.size());
                _httpMessageWriter.resetWriter();
            }
            
            if (size()>0)
                writeTo(_out);
        }
        catch (IOException e)
        {
            throw new EOFException(e);
        }
        finally
        {
            reset(_preReserve);
        }
    }
383622
public synchronized void flush() throws IOException {

        Enumeration keys = allSockets.keys();
        // close all sockets before removing them
        while (keys.hasMoreElements()) {
            SocketBox myBox = (SocketBox) keys.nextElement();
            if (myBox != null) {
                myBox.setSocket(null);
            }
        }

        allSockets.clear();
        freeSockets.clear();
        busySockets.clear();
    }
284935
public void flush() {
    lock.writeLock().lock();
    try {
      OMMapBufferEntry entry;
      for (Iterator<OMMapBufferEntry> it = bufferPoolLRU.iterator(); it.hasNext();) {
        entry = it.next();
        if (entry.file != null && entry.file.isClosed()) {
          if (removeEntry(entry))
            it.remove();
        }
      }
    } finally {
      lock.writeLock().unlock();
    }
  }
236729
@Override
    public void flush() throws IOException {
        PipedInputStream stream = target;
        if (stream == null) {
            return;
        }

        synchronized (stream) {
            stream.notifyAll();
        }
    }
454167
def flush_buffers(self):
    """"""
    while True:
      try:
        self.read(FLUSH_READ_SIZE, timeout_ms=10)
      except usb_exceptions.LibusbWrappingError as exception:
        if exception.is_timeout():
          break
        raise
758723
public void flush() {
    if(inline.length() > 0) {
      outStream.println(inline);
    }
    inline.setLength(0);
    if(comment.length() > 0) {
      quotePrintln(outStream, comment.toString());
    }
    comment.setLength(0);
  }
873409
public void flushBuffer()
  {
    try {
      _out.flushBuffer();
    } catch (IOException e) {
      log.log(Level.FINE, e.toString(), e);
    }
  }
1200147
function flush() {
        if (count($this->_buffer)) {
            print '<script type="text/javascript">';
            print "\nif ('console' in window) {\n";
            foreach ($this->_buffer as $line) {
                print "  $line\n";
            }
            print "}\n";
            print "</script>\n";
        };
        $this->_buffer = array();
    }
1120395
@Override
  public void flushBufferStopAtMark() throws IOException {
    final int end = pos;
    pos = mark;
    flushBuffer(true);
    out.flush();
    startPacket(0);

    System.arraycopy(buf, mark, buf, pos, end - mark);
    pos += end - mark;
    mark = -1;
    bufferContainDataAfterMark = true;
  }
1327957
@Override
    public final void flush()
        throws IOException
    {
        _flushBuffer();
        if (_writer != null) {
            if (isEnabled(Feature.FLUSH_PASSED_TO_STREAM)) {
                _writer.flush();
            }
        }
    }
727194
def flush(self):
        
        self._write_all(self._wbuffer.getvalue())
        self._wbuffer = BytesIO()
        return
196729
private final void flushBuffer()
        throws IOException
    {
        if (mOutputPtr > 0 && mOutputBuffer != null) {
            int ptr = mOutputPtr;
            // Need to update location info, to keep it in sync
            mLocPastChars += ptr;
            mLocRowStartOffset -= ptr;
            mOutputPtr = 0;
            mOut.write(mOutputBuffer, 0, ptr);
        }
    }
1264279
public void flush() throws IOException
  {
      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
      {
        Tr.debug(tc, "flush");
      }
      this.output.flush();
  }
483337
public void flush()
  {
    try {
      _out.flush();
    } catch (IOException e) {
      log.log(Level.FINE, e.toString(), e);
    }
  }
914975
private void flushBuffer() throws IOException
    {
        while (_flush.hasRemaining())
        {
            int len=_channel.write(_flush);
            if (len<0)
                throw new IOException("EOF");
            if (len==0)
            {
                // write channel full.  Try letting other threads have a go.
                Thread.yield();
                len=_channel.write(_flush);
                if (len<0)
                    throw new IOException("EOF");
                if (len==0)
                {
                    // still full.  need to  block until it is writable.
                    if (_selector==null)
                     {
                            _selector=Selector.open();
                            _channel.register(_selector,SelectionKey.OP_WRITE);
                     }

                     _selector.select();
                }
            }
        }
    }
71713
public void flushTo(OutputStream out) throws IOException {
		int n1 = _flushPosition / _bufferSize;
		int n2 = _position / _bufferSize;
		if (n1 < n2) {
			flushTo(Channels.newChannel(out));
		}
	}