标签:exce main code stream byte throws puts exception color
自定义的很简单的工具类
package com.neo.util; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class Fileutil { public static void main(String[] args) throws IOException { File filea = new File("e:"+File.separator+"test"+File.separator+args[0]); File file = new File("e:"+File.separator+"test"+File.separator+args[1]); OutputStream out=new FileOutputStream(file); InputStream in=new FileInputStream(filea); byte[] b=new byte[1024]; int temp=0; while ((temp=in.read(b))!=-1) { out.write(b,0,temp); } in.close(); out.close(); } }
标签:exce main code stream byte throws puts exception color
原文地址:https://www.cnblogs.com/rookietoboss/p/11105706.html