Here you can find the source of readLine(File file)
public static String readLine(File file) throws IOException
//package com.java2s; // it under the terms of the GNU General Public License as published by import java.io.*; public class Main { public static String readLine(File file) throws IOException { try (BufferedReader br = new BufferedReader(new FileReader(file))) { return br.readLine(); }/*from w w w . j a va 2 s.c o m*/ } }