question: public static void writeTextFile ( String directory , String filename , String data , boolean overwrite ) { try { File f ; f = Util . createFileOnDevice ( directory , filename , overwrite ) ; FileWriter fw = new FileWriter ( f . getAbsoluteFile ( ) ) ; BufferedWriter bw = new BufferedWriter ( fw ) ; bw . write ( data ) ; bw . close ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } }
target:  Write a text file on the device