package ch10_03;
import java.io.IOException;
public class StdInput {
	  public static void main(String[] args) throws IOException {
		byte b[]=new byte[512];
		System.out.println("请输入英文字符,按回车键结束：");
		int count=System.in.read(b);
		System.out.println("结果输出：");
		for(int i=0;i<count;++i){
			System.out.print(b[i]+" ");
		}
		System.out.println();
		System.out.println("----------------------------------------");
		for(int i=0;i<count;++i){
			System.out.print((char)b[i]+" ");
		}
		System.out.println();
		System.out.println("英文字符个数="+count);
		System.out.println("----------------------------------------");
		System.out.println("请输入一个英文字符：");
		int c=System.in.read();
		System.out.println("输入的字符为："+(char)c+"  ,字符编码值为："+c);
		System.out.println("----------------------------------------");
	  }
}
