If it's a text file why not use apache commons-io?
It has the following method
public static String readFileToString(File file) throws IOException
If you want the lines as a list use
public static List<String> readLines(File file) throws IOException
If it's a text file why not use apache commons-io?
It has the following method
public static String readFileToString(File file) throws IOException
If you want the lines as a list use
public static List<String> readLines(File file) throws IOException