Click or drag to resize
IByteBuffer Interface
Represents a byte buffer (backed by various means depending on the implementation).

Namespace: MongoDB.Bson.IO
Assembly: MongoDB.Bson (in MongoDB.Bson.dll) Version: 2.1.0
Syntax
public interface IByteBuffer : IDisposable

The IByteBuffer type exposes the following members.

Methods
  NameDescription
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.
(Inherited from IDisposable.)
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 methodGetByte
Gets a byte.
Public methodGetBytes
Gets bytes.
Public methodGetSlice
Gets a slice of this buffer.
Public methodMakeReadOnly
Makes this buffer read only.
Public methodSetByte
Sets a byte.
Public methodSetBytes
Sets bytes.
Top
Properties
  NameDescription
Public propertyCapacity
Gets the capacity.
Public propertyIsReadOnly
Gets a value indicating whether this instance is read only.
Public propertyLength
Gets or sets the length.
Top
See Also