## Java IO
* [1.Java ](#1java-)
* [2. java](#2-java)
* [3. java ](#3-java-)
* [4.](#4)
* [5.PrintStreamBufferedWriterPrintWriter?](#5printstreambufferedwriterprintwriter)
* [6.,,,](#6)
* [7.,,](#7)
* [8.BIO](#8bio)
* [9.NIO](#9nio)
* [10.AIO](#10aio)
* [11.](#11)
* [12.](#12)
* [13.](#13)
* [14.](#14)
* [15.](#15)
* [16.IO](#16io)
* [](#)
#### 1.Java
1inputStreamoutputStream2 FileReader BufferedReader3 InputStream OutputStreaInputStreamReader OutputStreamWriter
#### 2. java
#### 3. java
Serializable implements Serializable (File Output Stream) Object Output Stream() Object Output Stream write Object(Object obj) obj ()
#### 4.
UTF-8 3 MP3AVI byte byte OutputStreamInputStream 2 Unicode 1 Java 2 Unicode java ReaderWriter
#### 5.PrintStreamBufferedWriterPrintWriter?
1. PrintStreamPrintStreamPrintStream IOException checkError PrintStream
2. BufferedWriter:write()newLine()BufferedWriterflushBufferedWriterBufferedInputStream
3. PrintWriterprintlncheckErrorPrintWriterautoflush
#### 6.,,,
1.
2.
3.
#### 7.,,
1. close
2. finallyfinally
3.
4.
#### 8.BIO
BIO [java.io](http://java.io/) IO
#### 9.NIO
Java 1.4 java.nio ChannelSelectorBuffer IO
#### 10.AIO
AIO Java 1.7 NIO IO AIOAsynchronous IO IO
#### 11.
#### 12.
CPU CPU CPU CPU CPU CPU CPU
#### 13.
//
| | |
| ---------- | ------------------------------------------------------------ |
| | I/O CPU |
| | I/O I/O I/O I/O CPU I/O CPU I/O CPU |
| | I/O I/O |
| | I/O Cassandra Gossip I/O |
#### 14.
- I/O () Channel Buffer Channel NIO I/O
- Buffer
#### 15.
- Buffer NIO Buffer I/O I/O Stream
- NIO NIO
- /
ByteBuffer
CharBuffer
ShortBuffer
IntBuffer
LongBuffer
FloatBuffer
DoubleBuffer
#### 16.IO
IO(select/poll/epollrecvfrom)blocking IOrecvfromselect/poll/epoll connection+IO,socketnon-blocking,selectblocksocket
1select
(fd)writefds()readfds()exceptfds()select3 fdsetfdIO
FD
select() fd ()
FD1024
2poll
selectfd
3epoll
epoll
1)epoll_create()LinuxB+epollfd
2)epoll_ctl() epollfd, callback
3)epoll_wait() callbackIO
fdFD1G10
FD
mmap
###
https://zhuanlan.zhihu.com/p/124230020
https://blog.csdn.net/chengyuqiang/article/details/79183748
https://www.wkcto.com/article/detail/259
https://www.cnblogs.com/lanqingzhou/p/13609317.html
https://www.imooc.com/article/265871
https://blog.csdn.net/chenwiehuang/article/details/105296691