private void writeBufferedData ( ) throws IOException { if ( buffer . length ( ) > 0 ) { out . write ( formatMessage ( buffer . toString ( ) ) . getBytes ( ) ) ; out . write ( ' ' ) ; buffer = new StringBuffer ( ) ; } }
If the buffer has content then reformat and write the content to the output stream .