@Test public void testAppendLines() throws Exception { File file = tmpDir.newFile(); IOUtils.appendLines(file, new String[]{"a", "b", "c"}); String[] lines = IOUtils.readLines(file); assertThat(lines.length, equalTo(3)); assertThat(lines[0], equalTo("a")); assertThat(lines[1], equalTo("b")); assertThat(lines[2], equalTo("c")); }
public static void appendLines(File file, String[] lines) throws IOException { if (file == null) throw new IOException("File is null."); writeLines(new FileOutputStream(file, true), lines); }
IOUtils { public static void appendLines(File file, String[] lines) throws IOException { if (file == null) throw new IOException("File is null."); writeLines(new FileOutputStream(file, true), lines); } }
IOUtils { public static void appendLines(File file, String[] lines) throws IOException { if (file == null) throw new IOException("File is null."); writeLines(new FileOutputStream(file, true), lines); } private  IOUtils(); }
IOUtils { public static void appendLines(File file, String[] lines) throws IOException { if (file == null) throw new IOException("File is null."); writeLines(new FileOutputStream(file, true), lines); } private  IOUtils(); static long write(InputStream is, OutputStream os); static long write(InputStream is, OutputStream os, int bufferSize); static String read(Reader reader); static long write(Writer writer, String string); static long write(Reader reader, Writer writer); static long write(Reader reader, Writer writer, int bufferSize); static String[] readLines(File file); static String[] readLines(InputStream is); static void writeLines(OutputStream os, String[] lines); static void writeLines(File file, String[] lines); static void appendLines(File file, String[] lines); }
IOUtils { public static void appendLines(File file, String[] lines) throws IOException { if (file == null) throw new IOException("File is null."); writeLines(new FileOutputStream(file, true), lines); } private  IOUtils(); static long write(InputStream is, OutputStream os); static long write(InputStream is, OutputStream os, int bufferSize); static String read(Reader reader); static long write(Writer writer, String string); static long write(Reader reader, Writer writer); static long write(Reader reader, Writer writer, int bufferSize); static String[] readLines(File file); static String[] readLines(InputStream is); static void writeLines(OutputStream os, String[] lines); static void writeLines(File file, String[] lines); static void appendLines(File file, String[] lines);  }