public static String toString(Reader reader,boolean buffered) throws IOException {
  StringWriter sw=new StringWriter(512);
  if (buffered)   copy(toBufferedReader(reader),sw,-1);
 else   copy(reader,sw,-1);
  sw.close();
  return sw.toString();
}

public static String toString ( Reader reader , boolean buffered ) throws IOException { StringWriter sw = new StringWriter ( 512 ) ; if ( buffered ) copy ( toBufferedReader ( reader ) , sw , - 1 ) ; else copy ( reader , sw , - 1 ) ; sw . close ( ) ; return sw . toString ( ) ; }
reads string data from a reader
