code: public static String read(File file) throws IOException {
      Assert.isTrue(isFile(file), "[%1$s] must be a valid file", file);
      Assert.state(file.canRead(), "[%1$s] is unreadable", tryGetCanonicalPathElseGetAbsolutePath(file));
  
      BufferedReader fileReader = new BufferedReader(new FileReader(file));
      StringBuilder buffer = new StringBuilder();
  
      try {
        for (String line = fileReader.readLine(); line != null; line = fileReader.readLine()) {
          buffer.append(line);
          buffer.append(StringUtils.LINE_SEPARATOR);
        }
  
        return buffer.toString().trim();
      }
      finally {
        close(fileReader);
      }
    }
docs: Reads the contents of the given {@link File} into a {@link String}.
  
  @param file the source {@link File} to read the contents from.
  @return a {@link String} containing the contents of the given {@link File}.
  @throws IOException if an I/O error occurs while reading the {@link File}.
  @throws IllegalArgumentException if the {@link File} is not a valid file.
  @throws IllegalStateException if the file cannot be read.
  @see java.io.File#canRead()
  @see #isFile(File)