//将老文件,复制到新文件中
File oldFile = fileorDir;
File newFile = new File(dest,oldFile.getName());//!!!!!!!如何找到目标文件的文件对象
//创建拷贝动作需要的输入输出流
BufferedInputStream bis = new BufferedInputStream(new FileInputStream(oldFile));
BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(newFile));
//拷贝
byte[] bytes = new byte[1024];
int len;
while((len=bis.read(bytes))!=-1) {
bos.write(bytes, 0, len);
}