摘要:
字符输入流读取文本文件 1. Reader类(读取字符流的抽象类) Reader类的常用方法 方法名称 说明 int read() 从输入流中读取单个字符 int read(byte[] c) 从输入流中读取c .length长度的字符,保存到字节数组c中,返回实际读取的字符数 int read(b 阅读全文
摘要:
字节输入流读取文本文件 作用:将文件中的数据输入到内部储存器(内存)中. 读取数据的常用方法 方法名称 说明 int read() 读取一个字节数据 int read(byte[] b) 将数据读取到字节数组中 int read(byte[]b , int off , int len) 从输入流中读 阅读全文