public static void main(String[] args) {
FileChannel in = null, out = null;
try {
in = new FileInputStream(args[0]).getChannel();
out = new FileOutputStream(args[1]).getChannel();
out.transferFrom(in, 0, in.size());
} catch (IOException e) {
e.printStackTrace();
} finally{
try{
if (in != null) {in.close();}
if (out != null) {out.close();}
} catch (IOException ioe) {
// just eat the exception
}
}
}