public interface BsonReader
extends java.io.Closeable
Modifier and Type | Method and Description |
---|---|
void |
close() |
BsonType |
getCurrentBsonType() |
java.lang.String |
getCurrentName()
Gets the most recently read name.
|
BsonReaderMark |
getMark()
Gets a mark representing the current state of the reader.
|
void |
mark()
Deprecated.
Use
getMark() instead |
int |
peekBinarySize()
Peeks the size of the binary data that the reader is positioned at.
|
byte |
peekBinarySubType()
Peeks the subtype of the binary data that the reader is positioned at.
|
BsonBinary |
readBinaryData()
Reads BSON Binary data from the reader.
|
BsonBinary |
readBinaryData(java.lang.String name)
Reads a BSON Binary data element from the reader.
|
boolean |
readBoolean()
Reads a BSON Boolean from the reader.
|
boolean |
readBoolean(java.lang.String name)
Reads a BSON Boolean element from the reader.
|
BsonType |
readBsonType()
Reads a BSONType from the reader.
|
long |
readDateTime()
Reads a BSON DateTime from the reader.
|
long |
readDateTime(java.lang.String name)
Reads a BSON DateTime element from the reader.
|
BsonDbPointer |
readDBPointer()
Reads a BSON DBPointer from the reader.
|
BsonDbPointer |
readDBPointer(java.lang.String name)
Reads a BSON DBPointer element from the reader.
|
Decimal128 |
readDecimal128()
Reads a BSON Decimal128 from the reader.
|
Decimal128 |
readDecimal128(java.lang.String name)
Reads a BSON Decimal128 element from the reader.
|
double |
readDouble()
Reads a BSON Double from the reader.
|
double |
readDouble(java.lang.String name)
Reads a BSON Double element from the reader.
|
void |
readEndArray()
Reads the end of a BSON array from the reader.
|
void |
readEndDocument()
Reads the end of a BSON document from the reader.
|
int |
readInt32()
Reads a BSON Int32 from the reader.
|
int |
readInt32(java.lang.String name)
Reads a BSON Int32 element from the reader.
|
long |
readInt64()
Reads a BSON Int64 from the reader.
|
long |
readInt64(java.lang.String name)
Reads a BSON Int64 element from the reader.
|
java.lang.String |
readJavaScript()
Reads a BSON JavaScript from the reader.
|
java.lang.String |
readJavaScript(java.lang.String name)
Reads a BSON JavaScript element from the reader.
|
java.lang.String |
readJavaScriptWithScope()
Reads a BSON JavaScript with scope from the reader (call readStartDocument next to read the scope).
|
java.lang.String |
readJavaScriptWithScope(java.lang.String name)
Reads a BSON JavaScript with scope element from the reader (call readStartDocument next to read the scope).
|
void |
readMaxKey()
Reads a BSON MaxKey from the reader.
|
void |
readMaxKey(java.lang.String name)
Reads a BSON MaxKey element from the reader.
|
void |
readMinKey()
Reads a BSON MinKey from the reader.
|
void |
readMinKey(java.lang.String name)
Reads a BSON MinKey element from the reader.
|
java.lang.String |
readName()
Reads the name of an element from the reader.
|
void |
readName(java.lang.String name)
Reads the name of an element from the reader.
|
void |
readNull()
Reads a BSON null from the reader.
|
void |
readNull(java.lang.String name)
Reads a BSON null element from the reader.
|
ObjectId |
readObjectId()
Reads a BSON ObjectId from the reader.
|
ObjectId |
readObjectId(java.lang.String name)
Reads a BSON ObjectId element from the reader.
|
BsonRegularExpression |
readRegularExpression()
Reads a BSON regular expression from the reader.
|
BsonRegularExpression |
readRegularExpression(java.lang.String name)
Reads a BSON regular expression element from the reader.
|
void |
readStartArray()
Reads the start of a BSON array.
|
void |
readStartDocument()
Reads the start of a BSON document.
|
java.lang.String |
readString()
Reads a BSON String from the reader.
|
java.lang.String |
readString(java.lang.String name)
Reads a BSON string element from the reader.
|
java.lang.String |
readSymbol()
Reads a BSON symbol from the reader.
|
java.lang.String |
readSymbol(java.lang.String name)
Reads a BSON symbol element from the reader.
|
BsonTimestamp |
readTimestamp()
Reads a BSON timestamp from the reader.
|
BsonTimestamp |
readTimestamp(java.lang.String name)
Reads a BSON timestamp element from the reader.
|
void |
readUndefined()
Reads a BSON undefined from the reader.
|
void |
readUndefined(java.lang.String name)
Reads a BSON undefined element from the reader.
|
void |
reset()
Go back to the state at the last mark and removes the mark
|
void |
skipName()
Skips the name (reader must be positioned on a name).
|
void |
skipValue()
Skips the value (reader must be positioned on a value).
|
BsonType getCurrentBsonType()
java.lang.String getCurrentName()
BsonBinary readBinaryData()
byte peekBinarySubType()
mark()
int peekBinarySize()
mark()
BsonBinary readBinaryData(java.lang.String name)
name
- The name of the element.boolean readBoolean()
boolean readBoolean(java.lang.String name)
name
- The name of the element.BsonType readBsonType()
long readDateTime()
long readDateTime(java.lang.String name)
name
- The name of the element.double readDouble()
double readDouble(java.lang.String name)
name
- The name of the element.void readEndArray()
void readEndDocument()
int readInt32()
int readInt32(java.lang.String name)
name
- The name of the element.long readInt64()
long readInt64(java.lang.String name)
name
- The name of the element.Decimal128 readDecimal128()
Decimal128 readDecimal128(java.lang.String name)
name
- The name of the element.java.lang.String readJavaScript()
java.lang.String readJavaScript(java.lang.String name)
name
- The name of the element.java.lang.String readJavaScriptWithScope()
java.lang.String readJavaScriptWithScope(java.lang.String name)
name
- The name of the element.void readMaxKey()
void readMaxKey(java.lang.String name)
name
- The name of the element.void readMinKey()
void readMinKey(java.lang.String name)
name
- The name of the element.java.lang.String readName()
void readName(java.lang.String name)
name
- The name of the element.void readNull()
void readNull(java.lang.String name)
name
- The name of the element.ObjectId readObjectId()
ObjectId
valueObjectId readObjectId(java.lang.String name)
name
- The name of the element.BsonRegularExpression readRegularExpression()
BsonRegularExpression readRegularExpression(java.lang.String name)
name
- The name of the element.BsonDbPointer readDBPointer()
BsonDbPointer readDBPointer(java.lang.String name)
name
- The name of the element.void readStartArray()
void readStartDocument()
java.lang.String readString()
java.lang.String readString(java.lang.String name)
name
- The name of the element.java.lang.String readSymbol()
java.lang.String readSymbol(java.lang.String name)
name
- The name of the element.BsonTimestamp readTimestamp()
BsonTimestamp readTimestamp(java.lang.String name)
name
- The name of the element.void readUndefined()
void readUndefined(java.lang.String name)
name
- The name of the element.void skipName()
void skipValue()
@Deprecated void mark()
getMark()
insteadBsonReaderMark getMark()
void reset()
BSONException
- if no mark has been setvoid close()
close
in interface java.lang.AutoCloseable
close
in interface java.io.Closeable
Copyright © 2010 - 2020 Adobe. All Rights Reserved