Package org.bson
Class BsonBinaryReader
- java.lang.Object
-
- org.bson.AbstractBsonReader
-
- org.bson.BsonBinaryReader
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,BsonReader
public class BsonBinaryReader extends AbstractBsonReader
A BsonReader implementation that reads from a binary stream of data. This is the most commonly used implementation.- Since:
- 3.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.bson.AbstractBsonReader
AbstractBsonReader.State
-
-
Constructor Summary
Constructors Constructor Description BsonBinaryReader(java.nio.ByteBuffer byteBuffer)Construct an instance.BsonBinaryReader(BsonInput bsonInput)Construct an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclose()Closes the reader.Decimal128doReadDecimal128()voiddoReadStartArray()BsonInputgetBsonInput()Gets the BSON input backing this instance.BsonReaderMarkgetMark()Gets a mark representing the current state of the reader.voidmark()Deprecated.BsonTypereadBsonType()Reads a BSONType from the reader.voidreset()Deprecated.-
Methods inherited from class org.bson.AbstractBsonReader
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
-
BsonBinaryReader
public BsonBinaryReader(java.nio.ByteBuffer byteBuffer)
Construct an instance.- Parameters:
byteBuffer- the input for this reader
-
BsonBinaryReader
public BsonBinaryReader(BsonInput bsonInput)
Construct an instance.- Parameters:
bsonInput- the input for this reader
-
-
Method Detail
-
close
public void close()
Description copied from class:AbstractBsonReaderCloses the reader.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfaceBsonReader- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classAbstractBsonReader
-
getBsonInput
public BsonInput getBsonInput()
Gets the BSON input backing this instance.- Returns:
- the BSON input
-
readBsonType
public BsonType readBsonType()
Description copied from interface:BsonReaderReads a BSONType from the reader.- Specified by:
readBsonTypein interfaceBsonReader- Specified by:
readBsonTypein classAbstractBsonReader- Returns:
- A BSONType.
-
doReadDecimal128
public Decimal128 doReadDecimal128()
-
doReadStartArray
public void doReadStartArray()
-
mark
@Deprecated public void mark()
Deprecated.Description copied from interface:BsonReaderCreates 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:BsonReaderGets a mark representing the current state of the reader.- Returns:
- the mark
-
reset
@Deprecated public void reset()
Deprecated.Description copied from interface:BsonReaderGo back to the state at the last mark and removes the mark
-
-