Abstracted common functionality between ReaderDocumentSource and
StreamDocumentSource