JAVA中文站成立已经五年多了

源代码在线查看: class.dat

软件大小: 489 K
上传用户: wugu0
关键词: JAVA
下载地址: 免注册下载 普通下载 VIP

相关代码

				import java.io.*;
				
				public class ReadBytes {
				    public static void main(String[] arguments) {
				        try {
				            FileInputStream file = new
				                FileInputStream("class.dat");
				            boolean eof = false;
				            int count = 0;
				            while (!eof) {
				                int input = file.read();
				                System.out.print(input + " ");
				                if (input == -1)
				                    eof = true;
				                else
				                    count++;
				            }
				            file.close();
				            System.out.println("\nBytes read: " + count);
				        } catch (IOException e) {
				            System.out.println("Error -- " + e.toString());
				        }
				    }
				}
							

相关资源