Our NIO implementation -- especially socket channels -- is currently incomplete; the implementation we have relies on plain, blocking-IO sockets to implement channel operations (and, it does this by relying on socket timeouts to "emulate" nonblocking behavior). This solution won't work for all cases.
Specific issues with the current implementation include nonblocking connects not working, and neither does detecting EOF on a nonblocking read.
I don't think it's possible, or at least, wise, to try to use PlainSocketImpl to implement nonblocking sockets; that code (aside from suffering from the target-native brain damage) is far too reliant on the blocking model, and it looks difficult to teach it to handle nonblocking IO too. The current implementation is, at best, barely adequate.
The best solution, that I can think of, is to put the maybe-blocking operations (read, write, connect and accept) exclusively in the SocketChannelImpl class, to put the socket option manipulation in the PlainSocketImpl class, and to make blocking sockets just call to a private SocketChannel for IO operations.