Java New Io

Somebody chip in here, please.

Maybe I just do not get it, but Java's new I/O looks actually a lot more complex and obscure than corresponding C apis that do the same thing. Basically asynchronous I/O, and memory mapped files. Well, it supports (or is just designed to ? ) async I/O of more than bytes (ints, longs, floats etc with endianness takien care of), but who needs that when reading and writing bytes asynchronously makes you crave for the C compiler ?

And there's this issue that all of a sudden, files cannot be read or written asynchronously in Java (the corresponding FileChannel? does not have a method register(selector)). Anybody got any ideas why ? This whole design does not make much sense to me, there are how to do this and how to do that readily available, but other than that the whole API looks like a mumbo-jumbo. I simply do not understand why they have the limitation they have, why they created so many classes put together as such. In comparison ethe Windows SDK looks so much easier.


From what I've read, JavaNewIo only makes sense when you have large volumes of I/O taking place on multiple threads. For example, it would be helpful if you wanted to write a webserver from scratch. Most developers, including me, can ignore it, since third-party webserver and logging products handle most of the I/O bandwidth.


EditText of this page (last edited June 7, 2004) or FindPage with title or text search