code: private String getContents(Reader reader, String terminator) throws IOException
      {
          String line = null;
          StringBuffer buff = new StringBuffer();
          BufferedReader in = new BufferedReader(reader);
          while((line = in.readLine()) != null)
          {
              buff.append(line);
              if(terminator != null)
                  buff.append(terminator);
          }
          reader.close();
          return buff.toString();
      }
docs: Read the contents of the file using the given reader.
  @param reader The reader used to read the file stream
  @param terminator The line terminator of the YAML file
  @return The contents of the file as a string