question: synchronized public static void toFile ( String context , String fileName , boolean append ) throws IOException { PrintStream ps = new PrintStream ( new FileOutputStream ( fileName , append ) ) ; ps . println ( context ) ; ps . flush ( ) ; ps . close ( ) ; }
target:  Writes desired string data to appropriate file.