IO流
(1)分类
字节流:
输入流:
InputStream(抽象类)
int read()
int read(byte[] bys)
FileInputStream(常用基本流)
BufferedInputStream
输出流:
OutputStream(抽象类)
write(int by)
write(byte[] bys,int index,int len)
FileOutputStream(常用基本流)
BufferedOutputStream
字符流:
输入流:
Reader(抽象类)
int read()
int read(char[] chs)
FileReader(常用基本流)
BufferedReader
String readLine()
输出流:
Writer(抽象类)
write(int ch)
write(char[] chs,int index,int len)
FileWriter(常用基本流)
BufferedWriter
write(String line)
void newLine() |
|