Table of Contents

Class MultiChunkBuffer

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

An IByteBuffer that is backed by multiple chunks.

public sealed class MultiChunkBuffer : IByteBuffer, IDisposable
Inheritance
MultiChunkBuffer
Implements
Inherited Members
Extension Methods

Constructors

MultiChunkBuffer(IBsonChunkSource)

Initializes a new instance of the MultiChunkBuffer class.

MultiChunkBuffer(IEnumerable<IBsonChunk>, int?, bool)

Initializes a new instance of the MultiChunkBuffer class.

Properties

Capacity

Gets the capacity.

ChunkSource

Gets the chunk source.

IsReadOnly

Gets a value indicating whether this instance is read only.

Length

Gets or sets the length.

Methods

AccessBackingBytes(int)

Access the backing bytes directly. The returned ArraySegment will point to the desired position and contain as many bytes as possible up to the next chunk boundary (if any). If the returned ArraySegment does not contain enough bytes for your needs you will have to call ReadBytes instead.

Clear(int, int)

Clears the specified bytes.

Dispose()
EnsureCapacity(int)

Ensure that the buffer has a minimum capacity. Depending on the buffer allocation strategy calling this method may result in a higher capacity than the minimum (but never lower).

GetByte(int)

Gets a byte.

GetBytes(int, byte[], int, int)

Gets bytes.

GetSlice(int, int)

Gets a slice of this buffer.

MakeReadOnly()

Makes this buffer read only.

SetByte(int, byte)

Sets a byte.

SetBytes(int, byte[], int, int)

Sets bytes.