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();
}
}