List of usage examples for org.apache.commons.io IOUtils writeLines
public static void writeLines(Collection lines, String lineEnding, OutputStream output, String encoding) throws IOException
toString()
value of each item in a collection to an OutputStream
line by line, using the specified character encoding and the specified line ending. From source file:poisondog.io.WriteToText.java
@Override public Boolean execute(Collection<?> list) throws IOException, Exception { mTarget.create();//from w w w .j ava 2 s. c o m IOUtils.writeLines(list, null, mTarget.getOutputStream(), "utf8"); System.out.println("Save to: " + mTarget.getUrl()); return true; }