@Test public void copy_byteArrayToWriter() throws Exception { final ByteArrayOutputStream baout = new ByteArrayOutputStream(); final OutputStream out = new YellOnFlushAndCloseOutputStream(baout, false, true); final Writer writer = new java.io.OutputStreamWriter(out, "US-ASCII"); CopyUtils.copy(inData, writer); writer.flush(); assertEquals("Sizes differ", inData.length, baout.size()); assertTrue("Content differs", Arrays.equals(inData, baout.toByteArray())); }
public static void copy(final byte[] input, final OutputStream output) throws IOException { output.write(input); }
CopyUtils { public static void copy(final byte[] input, final OutputStream output) throws IOException { output.write(input); } }
CopyUtils { public static void copy(final byte[] input, final OutputStream output) throws IOException { output.write(input); } CopyUtils(); }
CopyUtils { public static void copy(final byte[] input, final OutputStream output) throws IOException { output.write(input); } CopyUtils(); static void copy(final byte[] input, final OutputStream output); @Deprecated static void copy(final byte[] input, final Writer output); static void copy(
            final byte[] input,
            final Writer output,
            final String encoding); static int copy(
            final InputStream input,
            final OutputStream output); static int copy(
            final Reader input,
            final Writer output); @Deprecated static void copy(
            final InputStream input,
            final Writer output); static void copy(
            final InputStream input,
            final Writer output,
            final String encoding); @Deprecated static void copy(
            final Reader input,
            final OutputStream output); static void copy(
            final Reader input,
            final OutputStream output,
            final String encoding); @Deprecated static void copy(
            final String input,
            final OutputStream output); static void copy(
            final String input,
            final OutputStream output,
            final String encoding); static void copy(final String input, final Writer output); }
CopyUtils { public static void copy(final byte[] input, final OutputStream output) throws IOException { output.write(input); } CopyUtils(); static void copy(final byte[] input, final OutputStream output); @Deprecated static void copy(final byte[] input, final Writer output); static void copy(
            final byte[] input,
            final Writer output,
            final String encoding); static int copy(
            final InputStream input,
            final OutputStream output); static int copy(
            final Reader input,
            final Writer output); @Deprecated static void copy(
            final InputStream input,
            final Writer output); static void copy(
            final InputStream input,
            final Writer output,
            final String encoding); @Deprecated static void copy(
            final Reader input,
            final OutputStream output); static void copy(
            final Reader input,
            final OutputStream output,
            final String encoding); @Deprecated static void copy(
            final String input,
            final OutputStream output); static void copy(
            final String input,
            final OutputStream output,
            final String encoding); static void copy(final String input, final Writer output);  }