Here you can find the source of readLines(final File file)
public static final String readLines(final File file) throws IOException
//package com.java2s; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; public class Main { public static final String readLines(final String file) throws IOException { return readLines(new File(file)); }/*from ww w.j a v a2 s . c om*/ public static final String readLines(final File file) throws IOException { final InputStream stream = new FileInputStream(file); final BufferedReader reader = new BufferedReader(new InputStreamReader(stream)); String lines = ""; String line; while ((line = reader.readLine()) != null) lines += line; reader.close(); stream.close(); return lines; } }