首页 > 代码库 > IO总结

IO总结

在电脑是新建一个文件夹

File file = new File("F:\\imgs");

File file = new File("F:/imgs");

 

输入:

字节流:

inputStream 

FileInputStream 

DataInputStream

字符流:

Reader

InputStresmReader

FileReader

BufferedReader (带有缓冲区的字符流,可以整行读取,构建时需要把Reader放进来)

 

输出:

字节流:

OutputStream

FileOutPutStream

DataOutputStream

字符流:

Writer

OutputStreamWriter

FileWriter

BufferedReader (带有缓冲区的字符流,构建时需要把Writer放进来)

 

IO总结