Click or drag to resize

SingleChunkBuffer Class

An IByteBuffer that is backed by a single chunk.
Inheritance Hierarchy

Namespace:  MongoDB.Bson.IO
Assembly:  MongoDB.Bson (in MongoDB.Bson.dll) Version: 2.8.0+cc573f3e1f48f39162b4b680e921a623e127e8fa
public sealed class SingleChunkBuffer : IByteBuffer, 

The SingleChunkBuffer type exposes the following members.

Public methodSingleChunkBuffer
Initializes a new instance of the SingleChunkBuffer class.
Public propertyCapacity
Gets the capacity.
Public propertyIsReadOnly
Gets a value indicating whether this instance is read only.
Public propertyLength
Gets or sets the length.
Public methodAccessBackingBytes
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.
Public methodClear
Clears the specified bytes.
Public methodDispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Public methodEnsureCapacity
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).
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetByte
Gets a byte.
Public methodGetBytes
Gets bytes.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetSlice
Gets a slice of this buffer.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodMakeReadOnly
Makes this buffer read only.
Public methodSetByte
Sets a byte.
Public methodSetBytes
Sets bytes.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Extension Methods
Public Extension MethodToBson
Serializes an object to a BSON byte array.
(Defined by BsonExtensionMethods.)
Public Extension MethodToBsonDocument
Serializes an object to a BsonDocument.
(Defined by BsonExtensionMethods.)
Public Extension MethodToJson
Serializes an object to a JSON string.
(Defined by BsonExtensionMethods.)
See Also