Table of Contents

Class BsonStreamAdapter

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

A Stream that wraps another Stream while implementing the BsonStream abstract methods.

public sealed class BsonStreamAdapter : BsonStream, IDisposable
Inheritance
BsonStreamAdapter
Implements
Inherited Members
Extension Methods

Constructors

BsonStreamAdapter(Stream, bool)

Initializes a new instance of the BsonStreamAdapter class.

Properties

BaseStream

Gets the base stream.

CanRead
CanSeek
CanTimeout
CanWrite
Length
Position
ReadTimeout
WriteTimeout

Methods

BeginRead(byte[], int, int, AsyncCallback, object)
BeginWrite(byte[], int, int, AsyncCallback, object)
Close()
CopyToAsync(Stream, int, CancellationToken)
Dispose(bool)
EndRead(IAsyncResult)
EndWrite(IAsyncResult)
Flush()
FlushAsync(CancellationToken)
Read(byte[], int, int)
ReadAsync(byte[], int, int, CancellationToken)
ReadByte()
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.

Seek(long, SeekOrigin)
SetLength(long)
SkipCString()

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

Write(byte[], int, int)
WriteAsync(byte[], int, int, CancellationToken)
WriteByte(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.