- 1
- 0
- 约1.07万字
- 约 52页
- 2017-07-08 发布于贵州
- 举报
网络程序设计(ava)第07章 文件与数据流new
* * 本章总体纲要 输入流与输出流 随机访问文件 读写器 文件类 File * * Reader和Writer(读写器) 前面讲的输入/输出流针对的是字节流 处理文本数据可以采用类java.io.Reader 和 java.io.Writer 类java.io.Reader 和java.io.Writer 是抽象(abstract )类是基于文本的其它读写器的父类(superclasses) 输入/输出流?字节流 读写器是基于字符 * * 类Reader和Writer中的成员方法 类java.io.Reader中的成员方法类似于类java.io.InputStream中的成员方法 类java.io.Writer中的成员方法类似于类java.io.OutputStream中的成员方法 * * 例如: 类Writer中的成员方法write public void write(int c) throws IOException 写出双字节的单个字符(其值范围: 从0到65535)。 其它write方法: public void write(char[ ] text) throws IOException public abstract void write(char[ ] text, int offset, int length) throws IOException publi
原创力文档

文档评论(0)