字节流:
输入流:
InputStream
FileInputStream:
int read(byte [] bytes);
void close();

输出流:
OutputStream
FileOutputStream
write(byte [] bytes)
write(byte [] bytes,int offset,int leng)
void close();

字符流:
输入流:
Reader
InputStreamReader,指定编码格式
FileReader,是InputStreamReader的子类,不能指定编码格式
BufferedReader 字符缓冲流(字符缓冲区,读取一行数据)
使用字符流读文件:
使用InputStreamReader 和 BufferedReader读取文件
输出流:
常见的I/O

相关文章:

  • 2022-01-17
  • 2022-12-23
  • 2022-01-12
  • 2021-07-19
  • 2022-12-23
  • 2021-12-08
  • 2021-07-12
猜你喜欢
  • 2021-08-10
  • 2021-06-17
  • 2022-12-23
  • 2022-01-25
  • 2021-12-19
  • 2021-06-22
  • 2021-10-16
相关资源
相似解决方案