This question has been encountered in recent interviews, as a programmer who can only write the code of running water, a face is crazy. Read the online explanation, the view is still very vague, the next I understand this understanding.
Lead to a topic, two large water tanks, one empty one full, let you put a cylinder inside the other inside.
IO: Synchronous blocking, the stupidest way, take a bailer, water, run back and forth.
NIO: Synchronous non-blocking, first to a pipe. One end of the water pipe to the empty tank, take a bailer, through the pipe mouth, irrigation.
AIO: Asynchronous non-blocking, the same is a water pipe, pump pumping, you do not have to work hard.
Again, synchronous asynchronous, synchronous, you take the bailer to run back or forth to the pipe are irrigation, you can not stop, until the completion,
What about blocking the non-blocking? Blocking. You're holding a bailer of water. To another tank to send, the other water only waiting for this scoop of water to be sent to the destination big tank, this is blocked
Non-blocking. Pipes of water, flowing continuously into the pipe.
Say the respective usage.
Io For example, you have less water, a few will be finished, but also to use the pipeline, pump it?
NIO, the water may be a little more, for speed,
AIO, a river of water, you are holding bailer, also very slow, and you are very tired
The difference between Java IO NiO AIO