@Test public void WriteMultiLineStringTest() throws IOException { List<String> strs = new ArrayList<>(Arrays.asList("Merhaba", "Dunya", "")); new SimpleTextWriter(tmpFile).writeLines(strs); List<String> read = new SimpleTextReader(tmpFile).asStringList(); for (int i = 0; i < read.size(); i++) { Assert.assertEquals(read.get(i), strs.get(i)); } }
public SimpleTextWriter writeLines(Collection<String> lines) throws IOException { try { IOs.writeLines(lines, writer); return this; } finally { if (!keepOpen) { close(); } } }
SimpleTextWriter implements AutoCloseable { public SimpleTextWriter writeLines(Collection<String> lines) throws IOException { try { IOs.writeLines(lines, writer); return this; } finally { if (!keepOpen) { close(); } } } }
SimpleTextWriter implements AutoCloseable { public SimpleTextWriter writeLines(Collection<String> lines) throws IOException { try { IOs.writeLines(lines, writer); return this; } finally { if (!keepOpen) { close(); } } } private  SimpleTextWriter(
      BufferedWriter writer,
      OutputStream os,
      String encoding,
      boolean keepOpen,
      boolean addNewLineBeforeClose);  SimpleTextWriter(String fileName);  SimpleTextWriter(String fileName, String encoding);  SimpleTextWriter(File file, String encoding);  SimpleTextWriter(File file); }
SimpleTextWriter implements AutoCloseable { public SimpleTextWriter writeLines(Collection<String> lines) throws IOException { try { IOs.writeLines(lines, writer); return this; } finally { if (!keepOpen) { close(); } } } private  SimpleTextWriter(
      BufferedWriter writer,
      OutputStream os,
      String encoding,
      boolean keepOpen,
      boolean addNewLineBeforeClose);  SimpleTextWriter(String fileName);  SimpleTextWriter(String fileName, String encoding);  SimpleTextWriter(File file, String encoding);  SimpleTextWriter(File file); static Builder builder(File file); static Builder utf8Builder(File file); static SimpleTextWriter oneShotUTF8Writer(File file); static SimpleTextWriter keepOpenUTF8Writer(File file); static SimpleTextWriter keepOpenWriter(OutputStream os, String encoding); static SimpleTextWriter oneShotWriter(OutputStream os, String encoding); static SimpleTextWriter keepOpenWriter(OutputStream os); String getEncoding(); boolean isKeepOpen(); SimpleTextWriter writeLines(Collection<String> lines); SimpleTextWriter writeLines(String... lines); SimpleTextWriter writeToStringLines(Collection<?> objects); SimpleTextWriter write(String s); SimpleTextWriter writeLine(String s); SimpleTextWriter writeLine(); SimpleTextWriter writeLine(Object obj); SimpleTextWriter copyFromStream(InputStream is); SimpleTextWriter copyFromURL(String urlStr); void close(); }
SimpleTextWriter implements AutoCloseable { public SimpleTextWriter writeLines(Collection<String> lines) throws IOException { try { IOs.writeLines(lines, writer); return this; } finally { if (!keepOpen) { close(); } } } private  SimpleTextWriter(
      BufferedWriter writer,
      OutputStream os,
      String encoding,
      boolean keepOpen,
      boolean addNewLineBeforeClose);  SimpleTextWriter(String fileName);  SimpleTextWriter(String fileName, String encoding);  SimpleTextWriter(File file, String encoding);  SimpleTextWriter(File file); static Builder builder(File file); static Builder utf8Builder(File file); static SimpleTextWriter oneShotUTF8Writer(File file); static SimpleTextWriter keepOpenUTF8Writer(File file); static SimpleTextWriter keepOpenWriter(OutputStream os, String encoding); static SimpleTextWriter oneShotWriter(OutputStream os, String encoding); static SimpleTextWriter keepOpenWriter(OutputStream os); String getEncoding(); boolean isKeepOpen(); SimpleTextWriter writeLines(Collection<String> lines); SimpleTextWriter writeLines(String... lines); SimpleTextWriter writeToStringLines(Collection<?> objects); SimpleTextWriter write(String s); SimpleTextWriter writeLine(String s); SimpleTextWriter writeLine(); SimpleTextWriter writeLine(Object obj); SimpleTextWriter copyFromStream(InputStream is); SimpleTextWriter copyFromURL(String urlStr); void close();  }