Add method to get a document from a stream, with replacement properties