public static String toString(Reader reader,long timeout) throws IOException {
  StringWriter sw=new StringWriter(512);
  copy(toBufferedReader(reader),sw,timeout);
  sw.close();
  return sw.toString();
}

public static String toString ( Reader reader , long timeout ) throws IOException { StringWriter sw = new StringWriter ( 512 ) ; copy ( toBufferedReader ( reader ) , sw , timeout ) ; sw . close ( ) ; return sw . toString ( ) ; }
reads string data from a reader
