20145226夏艺华 《Java程序设计》 课堂实践
20145226夏艺华 《Java程序设计》 课堂实践

手速慢了一秒,泪流成河。。。打水印的时间用太多了

/**
 * Created by XiaYihua on 2017/5/31.
 */

import java.io.*;

public class FilereadDemo {
    public static void main(String [] args) throws IOException{
        FileInputStream fis = new FileInputStream(args[3]);
        int i = 0;
        while(true){
            if(i%16==0) System.out.print("0000"+i);
            i++;
            int ch = fis.read();
            if(ch==-1) break;
            System.out.print((char)(ch) + " ");
            if(i%16==0) System.out.println();
        }
        fis.close();
    }
}

相关文章:

  • 2021-07-12
  • 2021-12-19
  • 2021-12-19
  • 2021-11-24
  • 2021-10-09
  • 2021-10-11
猜你喜欢
  • 2021-09-08
  • 2022-03-09
  • 2021-07-12
  • 2021-09-14
  • 2021-08-19
  • 2021-09-27
  • 2021-07-18
相关资源
相似解决方案