总结:对于各种流类,
package com.da;
//包括运行异常,和非运行异常
import java.io.*;
public class ryl {
public static void main(String[] args) {
try {
FileInputStream fis = new FileInputStream("log.txt");
int s;
while ((s = fis.read()) != -1) {
System.out.println(s);
}
fis.close();
} catch (FileNotFoundException e) {
// throw new FileNotFoundException();
System.out.println("message:" + e);
System.out.println("异常是:" + e.getMessage());
} catch (IOException EE) {
System.out.println("EE");
}
System.out.println("程序正常结束!!!!");
}
}