@ 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 .