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.- tz
TimeZone tz := TimeZone.curThe
TimeZonein which allDateTimesare returned in.This does not change the instant in the date time continuum, just time zone it is reported in. This lets a stored date time of
12 Dec 2012 18:00 UTCbe returned as12 Dec 2012 13:00 New_York.