标签:span while close lin nbsp style 读取 color buffer
1.从文件读取数据
BufferedReader br=new BufferedReader(new FileReader("路径"));
String S="";
String s;
while( (s=br.readLine()) !=null ){ S+=s; }//逐行读入 所有数据读入到S
br.close();
2.写入文件
BufferedWriter bw=new BufferedWriter(new FileWriter("路径"));
bw.write(S);
br.newLine();//换行
bw.close();
标签:span while close lin nbsp style 读取 color buffer
原文地址:https://www.cnblogs.com/zysys/p/9686861.html