public static List<String> includeFile(String path) {
File file = new File(path);
List<String> list = new ArrayList<String>();
try {
// BufferedReader bw = new BufferedReader(new FileReader(file));
BufferedReader bw = new BufferedReader(new InputStreamReader(new FileInputStream(file),"gbk"));
String line = null;
while ((line = bw.readLine()) != null) {
list.add(line);
}
bw.close();
} catch (IOException e) {
e.printStackTrace();
}
return list;
}
ANSI转化UTF-8的方法
最新推荐文章于 2020-12-15 16:16:47 发布