import java.io.FileInputStream;import java.io.FileNotFoundException;import java.io.IOException;public class Teest3 { public static void main(String[] args) throws IOException { // 目标,a.txt,读它 FileInputStream fileInputStream = ne
import java.io.FileInputStream;import java.io.FileNotFoundException;import java.io.IOException;public class Teest3 { public static void main(String[] args) throws IOException { // 目标,a.txt,读它 FileInputStream fileInputStream = new FileInputStream("a.txt"); // 一个字节一个字节的来读 int code = fileInputStream.read(); // 判断有没有读到数据 while (code != -1) { // 把code的值输出 System.out.println(code); // 光标右移 code = fileInputStream.read(); } System.out.println("game over"); }}