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

Source

InStream in { private set }

The underlying InStream.

make

Source

new make(InStream in)

Creates a BsonReader, wrapping the given InSteam. As per the BSON spec, the stream's endian is to little.

readCString

Source

Str readCString()

Reads a (null terminated) BSON String from the underlying InStream.

readDocument

Source

Str:Obj? readDocument()

Reads a BSON Document from the underlying InStream.

readInteger32

Source

Int readInteger32()

Reads a BSON Integer32 from the underlying InStream.

readInteger64

Source

Int readInteger64()

Reads a BSON Integer64 from the underlying InStream.