Effect of the title:
Split a picture into four pieces, because the picture coding problem, split after only see the effect of the first
Package com.hcj.july21.am;
Import Java.io.File;
Import Java.io.FileInputStream;
Import java.io.FileNotFoundException;
Import Java.io.FileOutputStream;
public class Testhe {public static void main (string[] args) throws Exception {file F1 = new File ("images/copy1.jpg");
File F2 = new file ("Images/copy2.jpg");
File F3 = new file ("Images/copy3.jpg");
File F4 = new file ("Images/copy4.jpg");
File out = new file ("Images2/treasuremap.jpg");
FileInputStream fis1 = new FileInputStream (F1);
FileInputStream Fis2 = new FileInputStream (F2);
FileInputStream fis3 = new FileInputStream (F3);
FileInputStream fis4 = new FileInputStream (f4);
FileOutputStream fos = new FileOutputStream (out);
byte[] buffer = new byte[60592 + 1000];
int read1 = fis1.read (buffer);
Fos.write (buffer, 0, read1);
int read2 = fis2.read (buffer);
Fos.write (buffer, 0, read2);
int read3 = fis3.read (buffer);
Fos.write (buffer, 0, READ3);
int read4 = fis4.read (buffer); Fos.wrITE (buffer, 0, READ4);
Fos.close ();
Fis4.close ();
Fis3.close ();
Fis2.close ();
Fis1.close ();
System.out.println ("End");
}
}