Package org.bson
Class BsonDocumentReader
- java.lang.Object
-
- org.bson.AbstractBsonReader
-
- org.bson.BsonDocumentReader
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,BsonReader
public class BsonDocumentReader extends AbstractBsonReader
ABsonReader
implementation that reads from an instance ofBsonDocument
. This can be used to decode aBsonDocument
using aDecoder
.- Since:
- 3.0
- See Also:
BsonDocument
,Decoder
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.bson.AbstractBsonReader
AbstractBsonReader.State
-
-
Constructor Summary
Constructors Constructor Description BsonDocumentReader(BsonDocument document)
Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Decimal128
doReadDecimal128()
BsonReaderMark
getMark()
Gets a mark representing the current state of the reader.void
mark()
Deprecated.BsonType
readBsonType()
Reads a BSONType from the reader.void
reset()
Deprecated.-
Methods inherited from class org.bson.AbstractBsonReader
close, getCurrentBsonType, getCurrentName, getState, peekBinarySize, peekBinarySubType, readBinaryData, readBinaryData, readBoolean, readBoolean, readDateTime, readDateTime, readDBPointer, readDBPointer, readDecimal128, readDecimal128, readDouble, readDouble, readEndArray, readEndDocument, readInt32, readInt32, readInt64, readInt64, readJavaScript, readJavaScript, readJavaScriptWithScope, readJavaScriptWithScope, readMaxKey, readMaxKey, readMinKey, readMinKey, readName, readName, readNull, readNull, readObjectId, readObjectId, readRegularExpression, readRegularExpression, readStartArray, readStartDocument, readString, readString, readSymbol, readSymbol, readTimestamp, readTimestamp, readUndefined, readUndefined, skipName, skipValue
-
-
-
-
Constructor Detail
-
BsonDocumentReader
public BsonDocumentReader(BsonDocument document)
Construct a new instance.- Parameters:
document
- the document to read from
-
-
Method Detail
-
doReadDecimal128
public Decimal128 doReadDecimal128()
-
readBsonType
public BsonType readBsonType()
Description copied from interface:BsonReader
Reads a BSONType from the reader.- Specified by:
readBsonType
in interfaceBsonReader
- Specified by:
readBsonType
in classAbstractBsonReader
- Returns:
- A BSONType.
-
mark
@Deprecated public void mark()
Deprecated.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.- Returns:
- the mark
-
reset
@Deprecated public void reset()
Deprecated.Description copied from interface:BsonReader
Go back to the state at the last mark and removes the mark
-
-