Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1063447
  • 博文数量: 284
  • 博客积分: 8223
  • 博客等级: 中将
  • 技术积分: 3188
  • 用 户 组: 普通用户
  • 注册时间: 2008-12-01 13:26
文章分类

全部博文(284)

文章存档

2012年(18)

2011年(33)

2010年(83)

2009年(147)

2008年(3)

分类: Java

2010-07-27 13:53:04

import java.io.*;
public class test {

    /**
     * @param args
     */

    public static void main(String[] args) throws Exception{
        // TODO Auto-generated method stub

        InputStream f = new FileInputStream("11");
        OutputStream f0 = new FileOutputStream("22");
        System.out.println("Total Available Bytes:"+f.available());
        byte b[] =new byte[100];
        int code;
        while(true){
            code = f.read(b);
            if(code<=0)break;
            f0.write(b);
        }
        f.close();
        f0.close();
        
    }

}


阅读(1215) | 评论(0) | 转发(0) |
0

上一篇:java-文件系统处理2

下一篇:java-序列化

给主人留下些什么吧!~~