Source Concurrent Programming Network (translator): Http://ifeve.com/java-nio-all/from http://tutorials.jenkov.com/java-nio/index.html
Java Nio:channels and buffers (channels and buffers)
The standard IO is based on the byte stream and the character stream, and NiO is based on the channels (channel) and buffers (buffer), where the data is always read from the channel to the buffer or written to the channel from the buffer.
Java nio:non-blocking io (non-blocking IO)
Java NIO allows you to use IO in a non-blocking way, for example: When a thread reads data from a channel to a buffer, the thread can do something else. When the data is written to the buffer, the thread can continue to process it. Writing a channel from a buffer is similar.
Java nio:selectors (selector)
Java NiO introduces the concept of selectors, which are used to listen for events on multiple channels (e.g., connection open, data arrival). Therefore, a single thread can listen on multiple data channels.
Study Manuals
1 Java NIO Tutorial 6 data transfer between Java NIO channels one Java NIO non-blocking server
2 Java NIO Overview 7 java nio Selector java nio datagramchannel
3 Java nio Channel 8 java nio filechannel java nio Pipe
4 Java nio Buffer 9 java nio socketchannel java nio and IO
5 java NiO scatter/gather java nio serversocketchannel-java NiO Path (to be translated)
Java NIO Files (pending translation)
+ Java NIO Asynchronousfilechannel (pending translation)
Java NIO Learning Summary Learning Manual