Java读写UTF-8格式的文件
File f=new File(rawfilename);if(f.exists()) {
BufferedReader br=null;
try {
String line;
InputStreamReader read = new InputStreamReader(new FileInputStream(f),"utf-8");
br=new BufferedReader(read);
while((line=br.readLine())!=null) {
/**/
}
}
}
页:
[1]