public static void main(String[] args) throws Exception {
File f = new File("E:\\word.txt"); // 原始文件
if (f.isFile() == true) {
FileInputStream fis = new FileInputStream(f);
BufferedInputStream bis = new BufferedInputStream(fis);
byte[] buf = new byte[fis.available()];
bis.read(buf);
bis.close();
File f2 = new File("E:\\orrd.txt"); // 复制后的文件
FileOutputStream fos = new FileOutputStream(f2);
BufferedOutputStream bos = new BufferedOutputStream(fos);
bos.flush(); //强制写出
bos.write(buf);
bos.close();