读取文件输入流
import java.io.FileInputStream; /* from 时代Java公众号 - N o w J a v a . c o m */ import java.io.IOException; public class Main { public static void main(String[] arguments) { try (FileInputStream file = new FileInputStream("save.gif")) { boolean eof = false; int count = 0; while (!eof) { int input = file.read(); System.out.print(input + " "); if (input == -1) /** 来自 NowJava.com - 时代Java**/ eof = true; else count++; } file.close(); System.out.println(