Java tutorial
import java.io.FileInputStream; import java.io.FileOutputStream; class Copy { public static void main(String[] args) throws Exception { FileInputStream fis = null; FileOutputStream fos = null; fis = new FileInputStream(args[0]); fos = new FileOutputStream(args[1]); int byte_; while ((byte_ = fis.read()) != -1) fos.write(byte_); } }