缓冲流程序的运行问题
import *;public class m5{
public static void main
(String[]args)throws
Exception{
BufferedInputStream
hcfz=new
BufferedInputStream
(new FileInputStream
("D:/cf/java/1.rmvb"));
BufferedOutputStream
hczt=new
BufferedOutputStream
(new FileOutputStream
("D:/cf/2.rmvb"));
byte[] hc=new byte
[2048];
int ff;
ff=hcfz.read(hc);
while (-ff!=(-1))
{
hczt.write(hc,0,ff);
ff=hcfz.read(hc);
}
hczt.flush();
hczt.close();
hcfz.close();
}
}
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at (Unknown Source)
at m5.main(m5.java:17)