Implement InputStream->read validate callback, add InputStream->select()