java目录复制的问题,最上层目录无法复制

public static void copyDir(File src, File dest) throws FileNotFoundException{
if(src.isDirectory()){
if(!dest.exists()){
dest.mkdir();
}

        String[] files = src.list();
        for (String file : files) {
            File srcFile = new File(src,file);
            File destFile = new File(dest,file);
            copyDir(srcFile, destFile);
        }
    }
    else{
        InputStream in = new FileInputStream(src);
        OutputStream out = new FileOutputStream(dest);
        byte[] buffer = new byte[1024];
        int length;
        try {
            while((length=in.read(buffer))!=-1){
                out.write(buffer, 0, length);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }finally{
            try {
                in.close();
                out.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}

主函数

public static void main(String[] args) {

    String source = "E:\\aa";
    String dest = "D:\\dd";
    File src = new File(source);
    File des = new File(dest);


    try {
        FileUtils.copyDir(src, des);
    } catch (FileNotFoundException e) {
        e.printStackTrace();
    }
}
复制目录 只能复制aa文件夹以下的文件夹和文件,怎么改?可以把aa也一起复制呢?
 public static void copyDir(File src, File dest,boolean isFirst) throws FileNotFoundException{
        if(src.isDirectory()){
            if(isFirst){
                String s = src.getName();
                dest = new File(dest,s);
                if(!dest.exists()){
                    dest.mkdir();
                }
            }
            if(!dest.exists()){
                dest.mkdir();
            }
                String[] files = src.list();
                //String srcfileAbsoutPath =  src.getAbsolutePath();
                //String destfileAbsoutPath =  dest.getAbsolutePath();
                for (String file : files) {
                    File srcFile = new File(src,file);
                    File destFile = new File(dest,file);
                    copyDir(srcFile, destFile,false);
                }
            }
            else{
                InputStream in = new FileInputStream(src);
                OutputStream out = new FileOutputStream(dest);
                byte[] buffer = new byte[1024];
                int length;
                try {
                    while((length=in.read(buffer))!=-1){
                        out.write(buffer, 0, length);
                    }
                } catch (IOException e) {
                    e.printStackTrace();
                }finally{
                    try {
                        in.close();
                        out.close();
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                }
            }
        }


        public static void main(String[] args) {
        String source = "i:\\test8\\deltest";
        String dest = "D:\\dd";
        File src = new File(source);
        File des = new File(dest);


        try {
            FileUtils.copyDir(src, des,true);
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }

只提供复制子目录,想复制aa,就把aa变成子目录就可以了