FileInputStream fi = new FileInputStream("c:/cmd.txt");
while((temp=fi.read())!=-1)
   System.out.print((char)temp);

InputStreamReader ir = new InputStreamReader((new FileInputStream("c:/cmd.txt")));
int temp;
System.out.print(ir.getEncoding());
while((temp=ir.read())!=-1)
  System.out.print((char)temp);cmd.txt里面是英文文本既然有字节流和字符流的区别
字节流是以一个字节为单位,而字符流是2个字节为单位的
为什么这两段程序的read输出都一样?
下面的不是要每次读出2个字节的内容吗?