IOUtils { public static long write(InputStream is, OutputStream os) throws IOException { return write(is, os, BUFFER_SIZE); } private  IOUtils(); static long write(InputStream is, OutputStream os); static long write(InputStream is, OutputStream os, int bufferSize); static long write(final InputStream input, final OutputStream output, final byte[] buffer); 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); static final int EOF; }
@Test public void testWrite1() throws Exception { assertThat((int) IOUtils.write(is, os, 16), equalTo(TEXT.length())); }
@Test public void testWrite2() throws Exception { assertThat((int) IOUtils.write(reader, writer, 16), equalTo(TEXT.length())); }
@Test public void testWrite3() throws Exception { assertThat((int) IOUtils.write(writer, TEXT), equalTo(TEXT.length())); }
@Test public void testWrite4() throws Exception { assertThat((int) IOUtils.write(is, os), equalTo(TEXT.length())); }
@Test public void testWrite5() throws Exception { assertThat((int) IOUtils.write(reader, writer), equalTo(TEXT.length())); }