question: public static boolean saveStringToFile ( String dataInput , String path ) { String filename = path ; File file = new File ( filename ) ; FileOutputStream fos ; byte [ ] data = dataInput . getBytes ( ) ; try { fos = new FileOutputStream ( file ) ; fos . write ( data ) ; fos . flush ( ) ; fos . close ( ) ; return true ; } catch ( FileNotFoundException e ) { e . printStackTrace ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } return false ; }
target:  save string to file