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 { // Create the input stream output stream the FileInputStream FIS = new new the 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(); } }