Java处理 文件复制

try {
InputStream in = new FileInputStream(new File(oldPath));
OutputStream out = new FileOutputStream(new File(newPath ));
byte[] be = new byte[100];
while (in.read(be) != -1) {
out.write(be);
}
in.close();
out.flush();
out.close();
} catch (Exception e) {
e.printStackTrace();
}

原文地址:https://www.cnblogs.com/haorun/p/6183773.html