FileReader是Reader的子类。
字符输入流的read方法使用字符数组读数据,即以字符为基本单位处理数据。
FileReader中的read方法是从其父类Reader继承而来。它有以下几种形式。
public int read() throws IOException;读取单个字符。返回范围为0到65535之间的int型值,如果到达流的末尾返回-1。
public int read(char[] c);读取多个字符到字符数组c中。如果到达流的末尾返回-1.
public int read(char[] c,int off,int len);读取len个字符存放到字符数组从off开始的位置中。如果到达流的末尾返回-1.