Here you can find the source of readFile(String fileFullPath)
public static List<String> readFile(String fileFullPath)
//package com.java2s; //License from project: Open Source License import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; public class Main { public static List<String> readFile(String fileFullPath) { List<String> retList = new ArrayList<String>(); try {/*w w w.j a v a 2 s.c o m*/ File inputFlie = new File(fileFullPath); InputStreamReader reader = new InputStreamReader(new FileInputStream(inputFlie)); BufferedReader br = new BufferedReader(reader); String line = ""; line = br.readLine(); while (line != null) { retList.add(line); line = br.readLine(); } br.close(); } catch (Exception e) { e.printStackTrace(); } return retList; } }