-
-
Save idletekz/72a871ae140fcd0a62974f4453d586d0 to your computer and use it in GitHub Desktop.
binary file copy example in groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
copy = { File src,File dest-> | |
def input = src.newDataInputStream() | |
def output = dest.newDataOutputStream() | |
output << input | |
input.close() | |
output.close() | |
} | |
//File srcFile = new File(args[0]) | |
//File destFile = new File(args[1]) | |
File srcFile = new File('src.png') | |
File destFile = new File('dest.png') | |
copy(srcFile,destFile) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment