code: public static String readerToString(Reader reader) {
  		try {
  			StringBuilder sb = new StringBuilder();
  			char[] buf = new char[1024];
  			int numRead = 0;
  			while ((numRead = reader.read(buf)) != -1) {
  				sb.append(buf, 0, numRead);
  			}
  			return sb.toString();
  		} catch (Exception e) {
  			throw new RuntimeException(e);
  		}
  
  	}
docs: Transforms a reader into a string.
  
  @param reader
  the reader to be transformed
  @return the string containing the content of the reader