图片的拷贝

import java.io.*;
public class pictureCopy {
public static void main(String[] args) throws IOException{
FileInputStream fis=new FileInputStream("C:\\Users\\lenovo\\Documents\\我的照片\\憧憬.jpg");
BufferedInputStream bufis=new BufferedInputStream(fis);

FileOutputStream fos=new FileOutputStream("C:\\Users\\lenovo\\Desktop\\copy憧憬.jpg");
BufferedOutputStream bufos=new BufferedOutputStream(fos);
int by=0;
while((by=bufis.read())!=-1){
bufos.write(by);
}
}

}

posted on 2012-05-14 16:41  java课程设计  阅读(188)  评论(0编辑  收藏  举报

导航