FileInputStream fis=new FileInputStream("D:\\lady.jpg");//取出 FileOutputStream fos=new FileOutputStream("D:\\lady2.jpg");//新文件名字 byte[] bytes=new byte[1024]; int c=0; while ((c=fis.read(bytes))!=-1){ fos.write(bytes,0,c); } fis.close(); fos.close();
FileInputStream fis=new FileInputStream("D:\\lady.jpg");//取出 FileOutputStream fos=new FileOutputStream("D:\\lady2.jpg");//新文件名字 byte[] bytes=new byte[1024]; int c=0; while ((c=fis.read(bytes))!=-1){ fos.write(bytes,0,c); } fis.close(); fos.close();