public static void copy ( Reader input , OutputStream output , String encoding ) throws IOException { Writer out = new OutputStreamWriter ( output , encoding ) ; copy ( input , out ) ; out . flush ( ) ; }
Copies reader to output stream using buffer and specified encoding .