Added support for querying the reader state.