protected String readString(Reader reader){
  if (reader == null) {
    return null;
  }
  StringBuilder buffer=new StringBuilder();
  try {
    while (true) {
      int c=reader.read();
      if (c == -1) {
        break;
      }
      buffer.append((char)c);
    }
    return buffer.toString();
  }
 catch (  Exception e) {
    assertTrue(false);
    return null;
  }
}

protected String readString ( Reader reader ) { if ( reader == null ) { return null ; } StringBuilder buffer = new StringBuilder ( ) ; try { while ( true ) { int c = reader . read ( ) ; if ( c == - 1 ) { break ; } buffer . append ( ( char ) c ) ; } return buffer . toString ( ) ; } catch ( Exception e ) { assertTrue ( false ) ; return null ; } }
read a string from the reader . this method reads until end of file .
