What is up with nio channels ? There were some nice talks when it was added to java but I still don’t see people using it in their applications.
Is there something wrong with it, or am I just not encountering people who use it?
Any nice examples as to why I should bother using it at all ?
Thanks
You’re asking about channels, but channels only make sense within the general framework of using the (relatively) new
niocapabilities as a whole.My guess is that of the many, many Java applications out in the world, not many need the capabilities of
nio. The usual “business” process read streams and/or files… nothing special.That said, the Apache folks have recently rewritten their core Java libraries ( http://hc.apache.org/ ) to use
nio, and claim some impressive performance benefits in some cases.nioalso lets you do stuff like memory-mapping files, and this can allow an application to do very fast random access to the file. Again, only some special applications need this, and that’s probably why you don’t see a lot of it used.