I want to read from an java.io.InputStream with a timeout. Apparently the correct way to do this is to use java.nio.channels.SelectableChannel and java.nio.channels.Selector. Unfortunately, it's not clear how to go from an InputStream to a SelectableChannel.
The InputStream is coming from a non-conventional source -- http://java.sun.com/products/javacomm/reference/api/javax/comm/CommPort.html#getInputStream()