@Test public void testCopy_byteArrayToWriterWithEncoding() throws Exception { final String inDataStr = "data"; final String charsetName = "UTF-8"; final StringWriter writer = new StringWriter(); CopyUtils.copy(inDataStr.getBytes(charsetName), writer, charsetName); assertEquals(inDataStr, writer.toString()); }
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);  }