标签:rgs read 一个 byte puts nbsp pac class style
package bianchengti; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; /* * 复制一个文件 */ public class FileCopy { public static void main(String[] args) throws IOException { // TODO Auto-generated method stub FileInputStream fis = new FileInputStream("e:/a.txt"); FileOutputStream fos =new FileOutputStream("e:/b.txt"); byte[] buff = new byte[256]; int len = 0; while((len = fis.read(buff))>0) { fos.write(buff,0,len); } System.out.println("复制完成"); fis.close(); fos.close(); } }
标签:rgs read 一个 byte puts nbsp pac class style
原文地址:http://www.cnblogs.com/liuzhenping/p/7609038.html