中国人用 中文RandomAccessFile loadfile=new RandomAccessFile(txtfile, "r");String tmpString = "";
while(loadfile.getFilePointer() < loadfile.length()) {
tmpString = loadfile.readLine(); //读取一行数据
//中文处理,GBK码转换,防止中文乱码
System.out.println(new String(tmpString.getBytes("iso-8859-1"),"GBK"));
}
while(loadfile.getFilePointer() < loadfile.length()) {
tmpString = loadfile.readLine(); //读取一行数据
//中文处理,GBK码转换,防止中文乱码
System.out.println(new String(tmpString.getBytes("iso-8859-1"),"GBK"));
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货