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