public static void main(final String[] args) throws Exception {
        createDir("c:\\test");
        createFile(INPUT_FILE);
        numSize = createRandomNum(THOUSAND_MILLION);

        sortFile(INPUT_FILE);

        long beginTime = System.currentTimeMillis();
        System.out.println("begin=" + beginTime);

        //拆分文件
        splitFile(INPUT_FILE, numSize);

        List<String> splitFilePathList = new ArrayList<String>();
        File dir = new File("c:\\test\\temp");
        File[] files = dir.listFiles();
        for (int i = 0; i < files.length; i++) {
            File file = files[i];
            splitFilePathList.add(file.getAbsolutePath());
        }
        //合并文件
        createFile(OUTPUT_FILE);
        mergeFile(splitFilePathList, OUTPUT_FILE);

        long endTime = System.currentTimeMillis();
        System.out.println("end=" + endTime);
        System.out.println("end-begin=" + (endTime - beginTime));
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss SSS");
        System.out.println(simpleDateFormat.format(endTime - beginTime));

        //删除拆分文件
        System.gc();
        Runtime.getRuntime().exec(new String[] { "cmd", "/c", "del", "c:\\test\\temp\\*.txt" });
    }