Hi, I am at a crossroads in deciding the I/O package I have to use in my current project. We are using Sun JVM 1.4.2 and I wanted to know how stable NIO is at present. I know its been around for a while (> 1 year), but I wanted to know if someone has this in production handling huge amount of data... and how is its performance?
Also, if someone can quickly point out the PITFALLS of using NIO (the most common mistakes that folks do while using NIO) and certain "MUST HAVE" features that that one must utilize to harness the power of NIO, that would be great.
I do have an option of using the threaded listener model (JVM 1.3.x), but ideally, I would like to save my system the unnecessary threading, if possible.
When the NIO was introduced in JDK 1.4, the existing java.io classes were retrofitted to use NIO as their implementation, so the stability and performance of NIO and the java.io libraries should be very similar. What makes NIO different is the additional functionality it brings to the API, like memory-mapped files, non-blocking sockets, multiplexing and so on (Top Ten Things You Can Do With NIO).