总结:对于各种流类,

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("程序正常结束!!!!");
	}
}

  

 

相关文章:

  • 2021-11-17
  • 2022-12-23
  • 2021-06-20
  • 2021-04-07
  • 2021-08-27
  • 2022-12-23
  • 2022-12-23
  • 2021-10-28
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-11
相关资源
相似解决方案