求解--如何通过流将程序完整输出
import * ;public class TestFileInputStream {
public static void main (String args[]){
int b = 0;
FileInputStream in = null ;
try {
in = new FileInputStream ("e:\\java\\code8\\TestFileInputStream");
} catch (FileNotFoundException e){
System.out.println ("don't found the file!");
System.exit (-1);
}
try {
long num = 0;
while ((b=in.read()) != -1){
System.out.print((char)b );
num ++;
}
in.close();
System.out.println();
System.out.println("Total read" + num + "byte");
}catch (IOException e1) {
System.out.println ("File read error");
System.exit(-1);
}
}
}
求解,如何通过流在DOS下将整个程序完整输出,求解