guava/src/com/google/common/io/Files.java
@Beta
  @Deprecated
  public
  static String readFirstLine(File file, Charset charset) throws IOException {
    return asCharSource(file, charset).readFirstLine();
  }
@Beta
  @Deprecated
  public
  static String readFirstLine(File file, Charset charset) throws IOException {
    return asCharSource(file, charset).readFirstLine();
  }
Reads the first line from a file. The line does not include line-termination characters, but
does include other leading and trailing whitespace.

@param file the file to read from
@param charset the charset used to decode the input stream; see {@link StandardCharsets} for
helpful predefined constants
@return the first line, or null if the file is empty
@throws IOException if an I/O error occurs
@deprecated Prefer {@code asCharSource(file, charset).readFirstLine()}. This method is
scheduled to be removed in January 2019.