getCurrentBsonType
in interface BsonReader
()
Gets the most recently read name.
getCurrentName
in interface BsonReader
Sets the type of the current value being read.
newType
- the BSON Type.
Sets the new current state of this reader.
newState
- the state to set this reader to.
Sets the field name for the key/value pair being read.
newName
- the field name
public void close()
Closes the reader.
close
in interface AutoCloseable
close
in interface BsonReader
close
in interface Closeable
protected boolean isClosed()
Return true if the reader has been closed.
Handles the logic to read binary data
protected abstract byte doPeekBinarySubType()
Handles the logic to peek at the binary subtype.
protected abstract int doPeekBinarySize()
Handles the logic to peek at the binary size.
protected abstract boolean doReadBoolean()
Handles the logic to read booleans
protected abstract long doReadDateTime()
Handles the logic to read date time
protected abstract double doReadDouble()
Handles the logic to read doubles
protected abstract void doReadEndArray()
Handles the logic when reading the end of an array
protected abstract void doReadEndDocument()
Handles the logic when reading the end of a document
protected abstract int doReadInt32()
Handles the logic to read 32 bit ints
protected abstract long doReadInt64()
Handles the logic to read 64 bit ints
Handles the logic to read Decimal128
()
Handles the logic to read JavaScript functions
()
Handles the logic to read scoped JavaScript functions
protected abstract void doReadMaxKey()
Handles the logic to read a Max key
protected abstract void doReadMinKey()
Handles the logic to read a Min key
protected abstract void doReadNull()
Handles the logic to read a null value
()
Handles the logic to read an ObjectId
Handles the logic to read a regular expression
Handles the logic to read a DBPointer
protected abstract void doReadStartArray()
Handles the logic to read the start of an array
protected abstract void doReadStartDocument()
Handles the logic to read the start of a document
()
Handles the logic to read a String
()
Handles the logic to read a Symbol
Handles the logic to read a timestamp
protected abstract void doReadUndefined()
Handles the logic to read an Undefined value
protected abstract void doSkipName()
Handles any logic required to skip the name (reader must be positioned on a name).
protected abstract void doSkipValue()
Handles any logic required to skip the value (reader must be positioned on a value).
Reads BSON Binary data from the reader.
readBinaryData
in interface BsonReader
public byte peekBinarySubType()
Peeks the subtype of the binary data that the reader is positioned at. This operation is not permitted if the mark is already set.
peekBinarySubType
in interface BsonReader
public int peekBinarySize()
Peeks the size of the binary data that the reader is positioned at. This operation is not permitted if the mark is already set.
peekBinarySize
in interface BsonReader
public boolean readBoolean()
Reads a BSON Boolean from the reader.
readBoolean
in interface BsonReader
()
Reads a BSONType from the reader.
readBsonType
in interface BsonReader
public long readDateTime()
Reads a BSON DateTime from the reader.
readDateTime
in interface BsonReader
public double readDouble()
Reads a BSON Double from the reader.
readDouble
in interface BsonReader
public void readEndArray()
Reads the end of a BSON array from the reader.
readEndArray
in interface BsonReader
public void readEndDocument()
Reads the end of a BSON document from the reader.
readEndDocument
in interface BsonReader
public int readInt32()
Reads a BSON Int32 from the reader.
readInt32
in interface BsonReader
public long readInt64()
Reads a BSON Int64 from the reader.
readInt64
in interface BsonReader
Reads a BSON Decimal128 from the reader.
readDecimal128
in interface BsonReader
()
Reads a BSON JavaScript from the reader.
readJavaScript
in interface BsonReader
()
Reads a BSON JavaScript with scope from the reader (call readStartDocument next to read the scope).
readJavaScriptWithScope
in interface BsonReader
public void readMaxKey()
Reads a BSON MaxKey from the reader.
readMaxKey
in interface BsonReader
public void readMinKey()
Reads a BSON MinKey from the reader.
readMinKey
in interface BsonReader
public void readNull()
Reads a BSON null from the reader.
readNull
in interface BsonReader
Reads a BSON ObjectId from the reader.
readObjectId
in interface BsonReader
ObjectId
value
Reads a BSON regular expression from the reader.
readRegularExpression
in interface BsonReader
Reads a BSON DBPointer from the reader.
readDBPointer
in interface BsonReader
public void readStartArray()
Reads the start of a BSON array.
readStartArray
in interface BsonReader
public void readStartDocument()
Reads the start of a BSON document.
readStartDocument
in interface BsonReader
Reads a BSON String from the reader.
readString
in interface BsonReader
Reads a BSON symbol from the reader.
readSymbol
in interface BsonReader
Reads a BSON timestamp from the reader.
readTimestamp
in interface BsonReader
public void readUndefined()
Reads a BSON undefined from the reader.
readUndefined
in interface BsonReader
public void skipName()
Skips the name (reader must be positioned on a name).
skipName
in interface BsonReader
public void skipValue()
Skips the value (reader must be positioned on a value).
skipValue
in interface BsonReader
Reads a BSON Binary data element from the reader.
readBinaryData
in interface BsonReader
name
- The name of the element.
Reads a BSON Boolean element from the reader.
readBoolean
in interface BsonReader
name
- The name of the element.
Reads a BSON DateTime element from the reader.
readDateTime
in interface BsonReader
name
- The name of the element.
Reads a BSON Double element from the reader.
readDouble
in interface BsonReader
name
- The name of the element.
Reads a BSON Int32 element from the reader.
readInt32
in interface BsonReader
name
- The name of the element.
Reads a BSON Int64 element from the reader.
readInt64
in interface BsonReader
name
- The name of the element.
Reads a BSON Decimal128 element from the reader.
readDecimal128
in interface BsonReader
name
- The name of the element.
Reads a BSON JavaScript element from the reader.
readJavaScript
in interface BsonReader
name
- The name of the element.
Reads a BSON JavaScript with scope element from the reader (call readStartDocument next to read the scope).
readJavaScriptWithScope
in interface BsonReader
name
- The name of the element.
Reads a BSON MaxKey element from the reader.
readMaxKey
in interface BsonReader
name
- The name of the element.
Reads a BSON MinKey element from the reader.
readMinKey
in interface BsonReader
name
- The name of the element.
Reads the name of an element from the reader.
readName
in interface BsonReader
Reads the name of an element from the reader.
readName
in interface BsonReader
name
- The name of the element.
Reads a BSON null element from the reader.
readNull
in interface BsonReader
name
- The name of the element.
Reads a BSON ObjectId element from the reader.
readObjectId
in interface BsonReader
name
- The name of the element.
Reads a BSON regular expression element from the reader.
readRegularExpression
in interface BsonReader
name
- The name of the element.
Reads a BSON DBPointer element from the reader.
readDBPointer
in interface BsonReader
name
- The name of the element.
Reads a BSON string element from the reader.
readString
in interface BsonReader
name
- The name of the element.
Reads a BSON symbol element from the reader.
readSymbol
in interface BsonReader
name
- The name of the element.
Reads a BSON timestamp element from the reader.
readTimestamp
in interface BsonReader
name
- The name of the element.
Reads a BSON undefined element from the reader.
readUndefined
in interface BsonReader
name
- The name of the element.
Throws an InvalidOperationException when the method called is not valid for the current ContextType.
methodName
- The name of the method.
actualContextType
- The actual ContextType.
validContextTypes
- The valid ContextTypes.
BsonInvalidOperationException
- when the method called is not valid for the current ContextType.
Throws an InvalidOperationException when the method called is not valid for the current state.
methodName
- The name of the method.
validStates
- The valid states.
BsonInvalidOperationException
- when the method called is not valid for the current state.
Verifies the current state and BSONType of the reader.
methodName
- The name of the method calling this one.
requiredBsonType
- The required BSON type.
Verifies the name of the current element.
expectedName
- The expected name.
BsonSerializationException
- when the name read is not the expected name
Ensures any conditions are met before reading commences. Throws exceptions if the conditions are not met.
methodName
- the name of the current method, which will indicate the field being read
type
- the type of this field
Get the context, which will indicate which state the reader is in, for example which part of a document it's currently reading.
Set the context, which will indicate which state the reader is in, for example which part of a document it's currently reading.
context
- the current context.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4