图片的拷贝
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);
}
}
}
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);
}
}
}