总结:new FileInputStream

package com.ds;

import java.io.*;

import com.da.fgbv;

public class rter {

	public static void main(String[] args) throws IOException {
		int i;
		FileInputStream fis;
		try {
			fis = new FileInputStream("sdt.tdt");// 打开文件
			// fis.read();

		} catch (FileNotFoundException E) {
			System.out.println("File Not Found");
			return;
		} catch (ArrayIndexOutOfBoundsException S) {
			System.out.println("Useage:ShowFile File");
			return;
		}
		do {
			i = fis.read();
			if (i != -1)
				System.out.println((char) i);
		} while (i != -1);
		fis.close();

	}
}

  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-13
  • 2021-12-22
  • 2021-12-13
  • 2021-10-17
  • 2022-12-23
猜你喜欢
  • 2021-08-11
  • 2022-12-23
  • 2022-12-23
  • 2021-09-15
  • 2021-05-30
  • 2021-06-25
相关资源
相似解决方案