public void clear ( ) throws IOException { if ( writer != null ) { throw new IOException ( ) ; } else { nextChar = 0 ; if ( limitBuffer && ( strBuffer . length ( ) > this . bodyContentBuffSize ) ) { //PK95332 - starts if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { logger . logp ( Level . FINE , CLASS_NAME , "BodyContentImpl" , "clear buffer, create new one with buffer size [" + this . bodyContentBuffSize + "]" ) ; } strBuffer = new StringBuffer ( this . bodyContentBuffSize ) ; } else if ( strBuffer != null ) { // PI24001 //PK95332 - ends strBuffer . setLength ( 0 ) ; // PK33136 } //PK95332 } }
Clear the contents of the buffer . If the buffer has been already been flushed then the clear operation shall throw an IOException to signal the fact that some data has already been irrevocably written to the client response stream .