File I/O: old I/O or NIO. Which is better?

Java introduced the New IO API in the 1.4 JDK release. The NIO API has been around for some time although in my experience, I have rarely seen the NIO APIs being used regularly. Developers have shown the tendency to prefer the older IO APIs of NIO.

There has been a healthy debate around whether the NIO is faster than IO. I have seen a number of articles contradicting each other. Therefore I decided to take the APIs for a spin.

Continue reading