Package org.bson

Class BsonDocumentReader

  • All Implemented Interfaces:, java.lang.AutoCloseable, BsonReader

    public class BsonDocumentReader
    extends AbstractBsonReader
    A BsonReader implementation that reads from an instance of BsonDocument. This can be used to decode a BsonDocument using a Decoder.
    See Also:
    BsonDocument, Decoder
    • Constructor Detail

      • BsonDocumentReader

        public BsonDocumentReader​(BsonDocument document)
        Construct a new instance.
        document - the document to read from
    • Method Detail

      • doReadDecimal128

        public Decimal128 doReadDecimal128()
      • mark

        public void mark()
        Description copied from interface: BsonReader
        Creates a bookmark in the BsonReader's input The previous mark must be cleared before creating a new one
      • getMark

        public BsonReaderMark getMark()
        Description copied from interface: BsonReader
        Gets a mark representing the current state of the reader.
        the mark
      • reset

        public void reset()
        Description copied from interface: BsonReader
        Go back to the state at the last mark and removes the mark