// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class Copy {
    public static void copy(String ifnm, String ofnm) throws IOException {
        FileInputStream istm = new FileInputStream(ifnm);
        FileOutputStream ostm = new FileOutputStream(ofnm);
        int b;
        while(istm.available() > 0) {
            b = istm.read();
            ostm.write((byte)b);
        }
        return;
    }
    public static void main(String[] args) throws Exception {
        copy(args[0], args[1]);
        return;
    }
}
