import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; public class FileR_W { public static void main(String[] args) throws IOException { //创建输入流输出流 FileInputStream fis = new FileInputStream("70.jpg"); FileOutputStream fos = new FileOutputStream("test_jpg.jpg",true); int len; byte[] b = new byte[1024]; while ((len=fis.read(b))!=-1){ fos.write(b,0,len); } fos.close(); fis.close(); } }