import java.io.*;
import java.nio.channels.*;
public class TransforTo {
public static void main (String[] args)throws Exception{
if(args.length != 2){
System.out.println("argument : soucefile destfile");
System.exit(1);
}
FileChannel in= new FileInputStream(args[0]).getChannel();
FileChannel out = new FileOutputStream(args[1]).getChannel();
in.transforTo(0,in.size(),1); //zhe
}
}
|
|