public void flush() throws IOException {
        if (anyAreSet(state, FLAG_CLOSED)) {
            throw UndertowMessages.MESSAGES.streamIsClosed();
        }
        if (buffer != null && buffer.position() != 0) {
            writeBufferBlocking(false);
        }
        if (channel == null) {
            channel = exchange.getResponseChannel();
        }
        Channels.flushBlocking(channel);
    }
public void flush ( ) throws IOException { if ( anyAreSet ( state , FLAG_CLOSED ) ) { throw UndertowMessages . MESSAGES . streamIsClosed ( ) ; } if ( buffer != null && buffer . position ( ) != 0 ) { writeBufferBlocking ( false ) ; } if ( channel == null ) { channel = exchange . getResponseChannel ( ) ; } Channels . flushBlocking ( channel ) ; }
{@inheritDoc}