@Test(expected = IOException.class) public void testCopyAndCloseWriter() throws Exception { int bytes = TEXT.length(); ByteArrayInputStream in = new ByteArrayInputStream(TEXT.getBytes()); ByteArrayOutputStream out = new ByteArrayOutputStream(); OutputStreamWriter writer = new OutputStreamWriter(out); StreamUtil.copyAndClose(in, writer); assertEquals(TEXT, out.toString()); StreamUtil.copyAndClose(new ErroringInputStream(), new OutputStreamWriter(new ByteArrayOutputStream())); }
public static void copyAndClose(InputStream input, Writer out) throws IOException { copyAndClose(input, out, Charset.defaultCharset()); }
StreamUtil { public static void copyAndClose(InputStream input, Writer out) throws IOException { copyAndClose(input, out, Charset.defaultCharset()); } }
StreamUtil { public static void copyAndClose(InputStream input, Writer out) throws IOException { copyAndClose(input, out, Charset.defaultCharset()); }  }
StreamUtil { public static void copyAndClose(InputStream input, Writer out) throws IOException { copyAndClose(input, out, Charset.defaultCharset()); }  static File createFile(InputStream input, int expected); static File createFile(InputStream input, int expected, String dir); static void copyStream(InputStream input, OutputStream output,
                                int expected); static void copyStream(InputStream input, OutputStream output); static InputStream makeCopy(InputStream input); static void copyAndClose(InputStream input, Writer out); static void copyAndClose(InputStream input, Writer out, Charset charset); static void copyAndClose(InputStream input, OutputStream out); }
StreamUtil { public static void copyAndClose(InputStream input, Writer out) throws IOException { copyAndClose(input, out, Charset.defaultCharset()); }  static File createFile(InputStream input, int expected); static File createFile(InputStream input, int expected, String dir); static void copyStream(InputStream input, OutputStream output,
                                int expected); static void copyStream(InputStream input, OutputStream output); static InputStream makeCopy(InputStream input); static void copyAndClose(InputStream input, Writer out); static void copyAndClose(InputStream input, Writer out, Charset charset); static void copyAndClose(InputStream input, OutputStream out);  }