package jinjieshilie; import java.io.*; public class huanchongliu { public static void main(String[] args) throws Exception { // TODO Auto-generated method stub BufferedInputStream hcfz=new BufferedInputStream( new FileInputStream("H:/ab.java")); BufferedOutputStream hczt=new BufferedOutputStream(new FileOutputStream("E:/ab.java")); byte[] hc=new byte[2048];//数字是缓冲区大小,单位是字节 int ff; ff=hcfz.read(hc); while(ff!=(-1)){ hczt.write(hc,0,ff); ff=hcfz.read(hc); } hczt.flush();//把最后在管道中的吸取出来 hczt.close(); hcfz.close(); } }