Technical exchange QQ group [JAVA, C++, Python, .NET, BigData, AI]: 170933152
We say that BIO is based on stream programming, but NIO is based on memory block programming, because buffer is a memory block
It is precisely because NIO is an operating memory block that non-blocking is realized
As you can see here, we say that this buffer is two-way, we need to know the original inputStream or outputstream
They are all one-way, but this NIO's buf is two-way.