public synchronized void flush(){
  try {
    writer.flush();
  }
 catch (  IOException ioe) {
    ioe.printStackTrace();
  }
}

public synchronized void flush ( ) { try { writer . flush ( ) ; } catch ( IOException ioe ) { ioe . printStackTrace ( ) ; } }
flushes the buffered output of the writer to the file .
