Click or drag to resize

ByteBufferSlice Class

Represents a slice of a byte buffer.
Inheritance Hierarchy
SystemObject
  MongoDB.Bson.IOByteBufferSlice

Namespace:  MongoDB.Bson.IO
Assembly:  MongoDB.Bson (in MongoDB.Bson.dll) Version: 2.6.0+Branch.origin/v2.6.x.Sha.593796a7b35dc59243383bcc684de296a5468f2e
Syntax
public class ByteBufferSlice : IByteBuffer, 
	IDisposable

The ByteBufferSlice type exposes the following members.

Constructors
  NameDescription
Public methodByteBufferSlice
Initializes a new instance of the ByteBufferSlice class.
Top
Properties
  NameDescription
Public propertyBuffer
Gets the buffer.
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
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
Releases all resources used by the ByteBufferSlice
Protected methodDispose(Boolean)
Releases unmanaged and - optionally - managed 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 (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetByte
Gets a byte.
Public methodGetBytes
Gets bytes.
Public methodGetHashCode (Inherited from Object.)
Public methodGetSlice
Gets a slice of this buffer.
Public methodGetType (Inherited from Object.)
Public methodMakeReadOnly
Makes this buffer read only.
Protected methodMemberwiseClone (Inherited from Object.)
Public methodSetByte
Sets a byte.
Public methodSetBytes
Sets bytes.
Public methodToString (Inherited from Object.)
Top
Extension Methods
  NameDescription
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.)
Top
See Also