public void resetBuffer ( ) throws IllegalStateException { // Shutdown filters without observation if ( _out != null && _out != _realOut ) { ArrayList save_observers = _observers ; _observers = null ; _nulled = true ; try { // discard current buffer and set it to output if ( _bufferedOut != null ) { _bufferedOut . resetStream ( ) ; if ( _bufferedOut instanceof ChunkingOutputStream ) ( ( ChunkingOutputStream ) _bufferedOut ) . setChunking ( false ) ; } } catch ( Exception e ) { LogSupport . ignore ( log , e ) ; } finally { _observers = save_observers ; } } _contentLength = - 1 ; _nulled = false ; _bytes = 0 ; _written = false ; _out = _realOut ; try { notify ( OutputObserver . __RESET_BUFFER ) ; } catch ( IOException e ) { LogSupport . ignore ( log , e ) ; } }
Reset Buffered output . If no data has been committed the buffer output is discarded and the filters may be reinitialized .