BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(absoluteFilePath), Charset.forName("GBK")));
StringBuilder sb = new StringBuilder();
String str;
while((str = br.readLine()) != null){
sb.append(str);
}
return sb.toString();
java读取GBK编码的文件
最新推荐文章于 2024-07-11 07:23:44 发布