Reputation: 37034
I revise knowledge about I/O in java. Now I an introduce with pipes. I noticed that java.io.*
have pipe mechanism and java.nio.*
have similar mechanism.
I am reading some tutorials about these things. My current vision - pipes from NIO and pipes from I/O looks same. But I understand that it is strange to have duplicate things in JDK. Thus I think that I am wrong.
Can you clarify difference?
Upvotes: 2
Views: 277
Reputation: 5101
IO is stream-oriented, NIO is buffer-oriented.
IO streams are blocking, NIO has non-blocking mode.
In this Java NIO Tutorial (by Jakob Jenkov) you find background and examples. It also helps you finding the best approach on your case.
Upvotes: 2