@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);
        }
    }
@ 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 ( ) ) ; if ( writingBody && null != this . _output [ this . outputIndex ] ) { this . _output [ this . outputIndex ] . flip ( ) ; } try { WsByteBuffer [ ] content = ( writingBody ) ? this . _output : null ; 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 ; 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 ] ) { this . _output [ i ] . position ( 0 ) ; this . _output [ i ] . limit ( 0 ) ; } } } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "flushUpgraded: disconnect write buffers in TCP when done" ) ; } _tcpContext . getWriteInterface ( ) . setBuffers ( null ) ; } }
Flush the output array of buffers to the network below.

@throws IOException