code: public static String readFromFileIntoString(File file) throws IOException {
          FileInputStream inputStream = new FileInputStream(file);
          BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, "UTF-8"));
          StringBuilder text = new StringBuilder();
  
          String line;
          while( (line = reader.readLine()) != null) {
              text.append(line).append("\n");
          }
          inputStream.close();
  
          return text.toString();
      }
docs: This method reads all data from a file into a String object
  @param file file to read text from
  @return <code>String</code> containing all file data
  @throws IOException IO exception