List of utility methods to do String to File Write
void | appendTextToFile(String file, String text) Simple method to append text to a file try { PrintWriter out = new PrintWriter(new BufferedWriter( new FileWriter(file, true))); out.print(text); out.close(); } catch (IOException e) { e.printStackTrace(); |
void | writeFile(List write File FileOutputStream inputfos = new FileOutputStream(inputFileName); for (String line : input) { inputfos.write(line.getBytes("UTF-8")); inputfos.write('\n'); inputfos.close(); |