62,616
社区成员
发帖
与我相关
我的任务
分享
try{
String encoding="UTF-8"; //字符编码
File f = new File(saveurl);
if(f.isFile() && f.exists()){
InputStreamReader read = new InputStreamReader (new FileInputStream(f),encoding);
BufferedReader in = new BufferedReader(read);
String line;
while((line = in.readLine())!=null) {
System.out.println(line);
}
read.close();
}
}
catch(Exception e){
System.out.println("读取文件内容操作出错");
e.printStackTrace();
}