i 绝望

依然

Miss Lang

java流类

总结: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();

	}
}

  

posted on 2013-11-14 08:49  juewang  阅读(208)  评论(0编辑  收藏  举报

绝望依然

Miss Lang