code: private static String fileAsString(String path) throws Exception {
          StringBuffer buffer = new StringBuffer();
          InputStream fis = new FileInputStream(path);
          InputStreamReader isr = new InputStreamReader(fis, "UTF-8");
          Reader in = new BufferedReader(isr);
          int ch;
          while ((ch = in.read()) > -1) {
              buffer.append((char) ch);
          }
          in.close();
          return buffer.toString();
      }
docs: Converts file into string.
  
  @param path
  The absolute file path of the file.
  @return The contents of the file as a string.
  @throws Exception
  If any type of error occurs during the conversion.