检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
作 者:孔昊[1] 胡银保[2] KONG Hao1,HU Yin-bao2(1.The Software Engineering Department,Lanzhou Polytechnic Collage,Lanzhou 730050,China;2.Network Center,Lanzhou Polytechnic Collage,Lanzhou 730050,China)
机构地区:[1]兰州工业高等专科学校软件工程系 [2]兰州工业高等专科学校网络中心
出 处:《电脑知识与技术(过刊)》2009年第6期1390-1392,共3页Computer Knowledge and Technology
摘 要: 标准I/O的行为方式是从键盘读取数据并在显示器上创建输出信息。如果考虑从文件读取输入,或者将输出结果和报错信息写入文件,可以采用重定向操作满足这样的要求。在标准I/O重定向的实现过程中,根据重定向方法的参数要求和对流进行读取的方式要求,采用合理的修饰器子类对基本I/O流进行层层包装,构造出符合要求的InputStream流对象或者PrintStream流对象,为重定向创建条件。而理解修饰器模式、灵活运用修饰器子类是这个过程中的关键。Reading data from keyboard and displaying data on screen is the standard I/O behavior.Thinking about reading data from files or writing result and erroneous information to files,redirecting action can meet these demands.By the demands of method parameters and reading stream ways,we can use reasonable decorator subclass to package basic I/O stream layer upon layer,construct InputStream object or PrintStream object,creat conditions for redirecting in the course of realization.Understanding decorator pattern and using decotaror subclass flexibly are the keys in this course.
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.13