BufferedReader bufr =new BufferedReader(new InputStreamReader(new FileInputStream("1.JPG")));
BufferedWriter bufw =new BufferedWriter(new OutputStreamWriter(new FileOutputStream("2.JPG")));
String line =null;
while ((line =bufr.readLine(l))!=null)
{
bufw.write(new String(line,0,leng));
bufw.newLine();
bufw.flush();
}
bufw.close();
bufr.close();
上面代码复制图片,为什么会丢失数据,请各位帮帮忙
|
|