Table of Contents

Class BsonStream

Namespace
MongoDB.Bson.IO
Assembly
MongoDB.Bson.dll

Represents a Stream has additional methods to suport reading and writing BSON values.

public abstract class BsonStream : Stream, IAsyncDisposable, IDisposable
Inheritance
BsonStream
Implements
Derived
Inherited Members
Extension Methods

Methods

ReadCString(UTF8Encoding)

Reads a BSON CString from the stream.

ReadCStringBytes()

Reads a BSON CString from the stream.

ReadDecimal128()

Reads a BSON Decimal128 from the stream.

ReadDouble()

Reads a BSON double from the stream.

ReadInt32()

Reads a 32-bit BSON integer from the stream.

ReadInt64()

Reads a 64-bit BSON integer from the stream.

ReadObjectId()

Reads a BSON ObjectId from the stream.

ReadSlice()

Reads a raw length prefixed slice from the stream.

ReadString(UTF8Encoding)

Reads a BSON string from the stream.

SkipCString()

Skips over a BSON CString leaving the stream positioned just after the terminating null byte.

WriteCString(string)

Writes a BSON CString to the stream.

WriteCStringBytes(byte[])

Writes the CString bytes to the stream.

WriteDecimal128(Decimal128)

Writes a BSON Decimal128 to the stream.

WriteDouble(double)

Writes a BSON double to the stream.

WriteInt32(int)

Writes a 32-bit BSON integer to the stream.

WriteInt64(long)

Writes a 64-bit BSON integer to the stream.

WriteObjectId(ObjectId)

Writes a BSON ObjectId to the stream.

WriteString(string, UTF8Encoding)

Writes a BSON string to the stream.