/*org.apache.commons.io.FileUtils:java文件工具类*/
String targetPath="/xxx/targetfile.pdf";//已知文件全路径
String sourcePath=/xxx/sourcefile.pdf";//复制文件全路径
File f=new File(targetPath);
try {
if(!f.exists()) {
f.createNewFile();
}
org.apache.commons.io.FileUtils.copyFile(new File(sourcePath), f);
} catch (IOException e) {
e.printStackTrace();
}