question: public static boolean writeToFile ( String filename , String message , boolean append ) { boolean result ; BufferedWriter writer ; try { writer = new BufferedWriter ( new FileWriter ( filename , append ) ) ; writer . write ( message ) ; writer . newLine ( ) ; writer . flush ( ) ; writer . close ( ) ; result = true ; } catch ( Exception e ) { result = false ; } return result ; }
target:  Writes the given message to the specified file. The message is either  appended or replaces the current content of the file.