我就是想知道 FielWriter 中的write(buf,0,len)为什么不用刷新 是不是被封装在哪里了
FileWriter fw = null;
FileReader fr = null;
fw = new FileWriter("beCopy.java");
fr = new FileReader("Copy1.java");
char[] buf = new char[1024];
int len = 0;
while ((len = fr.read(buf))!=-1)
{
fw.write(buf,0,len);
}
fr.close();
fw.close(); |