Here you can find the source of saveListString(List
public static void saveListString(List<String> list, String filename)
//package com.java2s; //License from project: Apache License import java.io.*; import java.util.List; public class Main { public static void saveListString(List<String> list, String filename) { BufferedWriter out;/*from ww w .j ava2 s . c o m*/ try { out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(filename), "UTF8")); for (int i = 0; i < list.size(); i++) { out.write((String) list.get(i) + "\n"); } out.close(); } catch (IOException ex) { System.err.println(ex.toString()); System.exit(1); } } }