/** * Copies the content of a reader to an output stream. * * @param reader the reader to read * @param out the output stream to write * * @throws IOException if an I/O error occurs */ public static void copy( Reader reader, OutputStream out ) throws IOException { copy( reader, getOutputStreamWriter( out ) ); out.flush(); }