1、字符输入流Reader
Reader类是读取字符流的抽象超类。
常用方法:
int read():读取单个字符并返回。
int read(byte[] cbuf):将数据读取到字节数组中,并返回读取的个数。
2、FileReader类
FileReader类用于字节流。
3、字符输出流write
write类是用于写入字符流的抽象类。
void write(byte[] cbuf):写入字符数组。
abstract void write(byte[] b, int off, int len):写入字符数组的一部分。
void write(int c):写入单个字符。
void write(String str):写入字符串。
void write(String str, int off, int len):写入字符串的某一部分。
4、FileWrite类
FileWrite类用于向文件中写入字符。