/**
* 获取文件内容流
*
* @param path 文件路径
* @param fileName 文件名称
* @return
*/
public static BufferedReader readFileContent(String filePath,String fileName){
// 获取文件内容
File file = new File(filePath + "/" + fileName);
FileInputStream readerFile = null;
InputStreamReader reader = null;
BufferedReader breader = null;
// 判断文件是否存在
if (file.exists()) {
try {
// 获取文件内容
readerFile = new FileInputStream(file);
// 编码
reader = new InputStreamReader(readerFile, getCharset(filePath + "/" + fileName));
// 按行读取
breader = new BufferedReader(reader);
} catch (Exception e) {
e.printStackTrace();
}
} else {
System.out.println("File is not exist!");
}
return breader;
}