classafBson::BsonReader
sys::Obj afBson::BsonReader
Wraps an InStream to read BSON objects.
Note that Binary objects with a subtype of BIN_GENERIC will be read and returned as a Buf.
- in
InStream in { private set }The underlying
InStream.- make
new make(InStream in)Creates a
BsonReader, wrapping the givenInSteam. As per the BSON spec, the stream's endian is tolittle.- readCString
Str readCString()Reads a (null terminated) BSON String from the underlying
InStream.- readDocument
Reads a BSON Document from the underlying
InStream.- readInteger32
Int readInteger32()Reads a BSON Integer32 from the underlying
InStream.- readInteger64
Int readInteger64()Reads a BSON Integer64 from the underlying
InStream.