import java.io.*;
public class jcopy {
public static void main(string args[]){
try {
jcopy j = new jcopy(); j.copyfile(new file(args[0]),new file(args[1]));
}
catch (exception e) {
e.printstacktrace();
}
}
public void copyfile(file in, file out) throws exception {
fileinputstream fis = new fileinputstream(in);
fileoutputstream fos = new fileoutputstream(out);
byte[] buf = new byte[1024];
int i = 0;
while((i=fis.read(buf))!=-1) {
fos.write(buf, 0, i);
}
fis.close();
fos.close();
}
}
public class jcopy {
public static void main(string args[]){
try {
jcopy j = new jcopy(); j.copyfile(new file(args[0]),new file(args[1]));
}
catch (exception e) {
e.printstacktrace();
}
}
public void copyfile(file in, file out) throws exception {
fileinputstream fis = new fileinputstream(in);
fileoutputstream fos = new fileoutputstream(out);
byte[] buf = new byte[1024];
int i = 0;
while((i=fis.read(buf))!=-1) {
fos.write(buf, 0, i);
}
fis.close();
fos.close();
}
}
闽公网安备 35060202000074号