public static void copyByBuffered(String str1,String str2)
{
BufferedReader bufr=null;
BufferedWriter bufw=null;
try
{
bufr=new BufferedReader(new FileReader(str1));
bufw=new BufferedWriter(new FileWriter(str2));
String line=null;
while ((line=bufr.readLine())!=null)
{
bufw.write(line);
}
}
上面的红色部分为什么可以直接传入字符串啊!!
API上面是 write(String s,int off,int len)啊!!这边为什么不用啊 |
|