for (File file : listFiles) {
if (file.isFile()) {
// 读取源文件 file : bbb下的文件 bj.txt
BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file));
// 写出 文件 dest :eee\bbb\bj.txt
BufferedOutputStream bos = new BufferedOutputStream(
new FileOutputStream(new File(dest, file.getName())));
int b;
while ((b = bis.read()) != -1) {
bos.write(b);
}
bos.close();
bis.close();
} else {
copy(file, new File(dest, file.getName()));
}
}