介绍
Java
io
是为了实现“文件、控制台、网络设备”等输入输出设备之间的通信。
IO框架分类
字节为单位的IO流
- OutputStream/InputStream:以字节为单位的IO流的超类
- ByteArrayOutputStream/ByteArrayInputStream:字节数组IO流
- PipedOutputStream/PipedInputStream:管道IO流,实现多线程间的管道通信
- FilterOutputStream/FilterInputStream:过滤IO流
- DataOutputStream/DataInputStream:数据IO流
- BufferedOutputStream/BufferedInputStream:缓冲IO流
- PrintStream:打印输出流
- FileOutputStream/FileInputStream:文件IO流
- ObjectOutputStream/ObjectInputStream:对象IO流
字符为单位的IO流
- Writer/Reader:以字符为单位的IO流的超类
- CharArrayWriter/CharArrayReader:字符数组的IO流
- PipedWriter/PopedReader:字符类型的管道IO流
- FliterWriter/FliterReader:字符类型的过滤IO流
- BufferedWriter/BufferedReader:字符缓冲IO流
- OutputStreamWriter/InputStreamReader:字节转字符的IO流
- FileWriter/FileReader:字符类型的IO流
- PrintWriter:字符类型的打印输出流