下面的程序一直出错:为了找出错,没有写try catch,直接抛;
把目的改为"d:\\初雪.mp3",即把C盘改为D盘,就复制成功了;这是怎么回事?
public static void main(String[] args) throws IOException{
FileInputStream fi = new FileInputStream("f:\\初雪.mp3");
FileOutputStream fo = new FileOutputStream("c:\\初雪.mp3");
BufferedInputStream bi = new BufferedInputStream(fi);
BufferedOutputStream bo = new BufferedOutputStream(fo);
int len =0;
while((len=bi.read(bt))!=-1){
bo.write(len);
}
bi.close();
bo.close();
} |
|