readDocument
Instantiates a new BSON document by reading its bytes representation.
The reverse operation is available as BsonDocument.toByteArray.
Returns a BsonDocument that is tied to this factory, that represents the same data as document.
This method is useful when you need to convert from a different BsonDocument implementation to the one returned by this factory. For example, if you have a BsonDocument from the Multiplatform driver and you want to convert it to one from the official driver.
The returned document may be referentially identical to document if document was already produced by this factory.
The returned document may share memory with document.