Here you can find the source of writeLines(Path base, String file, String[] content)
public static Path writeLines(Path base, String file, String[] content)
//package com.java2s; //License from project: Apache License import java.io.*; import java.nio.charset.Charset; import java.nio.file.*; public class Main { private static Charset CHARSET = Charset.forName("UTF-8"); public static Path writeLines(Path base, String file, String[] content) { Path out = base.resolve(file); try (PrintWriter writer = new PrintWriter(Files.newBufferedWriter(out, CHARSET))) { for (String line : content) { writer.println(line);/*from www. j a v a2 s. c o m*/ } } catch (IOException e) { e.printStackTrace(); } return out; } }