private ArrayList<File> split(File file) throws IOException {
        ArrayList<File> files = new ArrayList<File>();
        int[] buffer = new int[FILE_COUNT];
		FileInputStream fr = new FileInputStream(file);
		BufferedInputStream bin = new BufferedInputStream(fr, BUFFER_SIZE);
		DataInputStream din = new DataInputStream(bin);
        boolean fileComplete = false;
        
        while (!fileComplete) {
            int index = buffer.length;
            for (int i = 0; i < buffer.length && !fileComplete; i++) {
            	try {
					buffer[i] = din.readInt();
				} catch (Exception e) {
					fileComplete = true;
                    index = i;
				}
            }
            if (index != 0 && buffer[0] > -1) {
                Arrays.sort(buffer, 0, index);
				File f = new File("set" + new Random().nextInt());
         //       File temp = File.createTempFile("josp", ".tmp", f);   
				FileOutputStream writer = new FileOutputStream(f);
				BufferedOutputStream bOutputStream = new BufferedOutputStream(
						writer);

				DataOutputStream dout = new DataOutputStream(bOutputStream);
                for (int j = 0; j < index; j++) {
					dout.writeInt(buffer[j]);
                }
                dout.close();
				bOutputStream.close();
				writer.close();
                files.add(f);
               
            }

        }
		din.close();
        bin.close();
		fr.close();
        return files;
    }