Here you can find the source of writeStreamCharwise(final Reader in, final Writer out)
public static void writeStreamCharwise(final Reader in, final Writer out) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.IOException; import java.io.Reader; import java.io.Writer; public class Main { public static void writeStreamCharwise(final Reader in, final Writer out) throws IOException { for (int read; (read = in.read()) != -1;) { out.write(read);/*from w ww .j av a 2 s . c o m*/ } } }