code: public static String read(Reader reader) throws IOException {
          final char[] buffer = new char[1024];
          StringBuilder sb = new StringBuilder();
          int len;
          while ((len = reader.read(buffer)) != -1) {
              sb.append(buffer, 0, len);
          }
          return sb.toString();
      }
docs: Returns a string from the specified Reader object.
  
  @param reader the reader
  @return the string
  @throws IOException if an error occurred when reading resources using any I/O operations