- fos = new FileOutputStream("c:\\2.bmp");
- fis = new FileInputStream("c:\\1.2bmo");
- <span style="background-color: red;"> byte[] buf = new byte [1024];</span>
- int len = 0;
- while((len=fis.read(buf))!=-1)
- {
- fos.write(buf,0,len);
- }
复制代码 关于红色部分,我好几次看见类似的代码,为什么都要以1024单位呢???
|
|