Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FileChannel inputChannel = null;
- FileChannel outputChannel = null;
- String sourceFilePathStr="âĒC:\Users\abc xyz\Downloads";
- File source = new File(sourceFilePathStr,"designspec.docx");
- File dest = new File(repo.getDirectory().getParent(),"designspec.docx");
- inputChannel = new FileInputStream(source).getChannel();
- outputChannel = new FileOutputStream(dest).getChannel();
- outputChannel.transferFrom(inputChannel, 0, inputChannel.size());
- log.info("copy complete");
- } finally {
- inputChannel.close();
- outputChannel.close();
- }
- inputChannel.close();
Add Comment
Please, Sign In to add comment