public static void copyDirectiory(String sourceDir, String targetDir)
    {
        try
        {
            File tFile = new File(targetDir);
            if (!tFile.exists())
            {
                tFile.mkdirs();
            }
            File sFile = new File(sourceDir);
            if (!sFile.exists())
            {
                return;
            }
            File[] files = sFile.listFiles();
            for (int i = 0; i < files.length; i++)
            {
                if (files[i].isFile())
                {
                    FileInputStream input = new FileInputStream(files[i]);
                    FileOutputStream output = new FileOutputStream(targetDir + File.separatorChar + files[i].getName());
                    byte[] b = new byte[1024 * 5];
                    int len;
                    while ((len = input.read(b)) != -1)
                    {
                        output.write(b, 0, len);
                    }
                    output.flush();
                    output.close();
                    input.close();
                }
                if (files[i].isDirectory())
                {
                    copyDirectiory(sourceDir + File.separatorChar + files[i].getName(), targetDir + File.separatorChar
                            + files[i].getName());
                }
            }
        }
        catch (Exception ex)
        {
            ////System.out.println("将目录拷贝至目标目录出错");
            ex.printStackTrace();
        }
    }