JRuby raises Errno::EAGAIN on read_nonblock even when IO.select says it is readable (1.6.6, in both 1.8 and 1.9 mode). Use the blocking readpartial method instead.
[Validate]