ByteArrayBuffer Class (original) (raw)

An IByteBuffer that is backed by a contiguous byte array.

Inheritance Hierarchy

Namespace: MongoDB.Bson.IO
Assembly: MongoDB.Bson (in MongoDB.Bson.dll) Version: 2.10.0+569905ff5e778c38ea19d9d0392496a83e1704ed

Syntax

public sealed class ByteArrayBuffer : IByteBuffer, IDisposable

Public NotInheritable Class ByteArrayBuffer Implements IByteBuffer, IDisposable

[] type ByteArrayBuffer =
class interface IByteBuffer interface IDisposable end

The ByteArrayBuffer type exposes the following members.

Constructors

Properties

| | Name | Description | | | ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ | ----------------------------------------------------------- | | Public property | Capacity | Gets the capacity. | | Public property | IsReadOnly | Gets a value indicating whether this instance is read only. | | Public property | Length | Gets or sets the length. |

Top

Methods

| | Name | Description | | | ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | Public method | AccessBackingBytes | 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 method | Clear | Clears the specified bytes. | | Public method | Dispose | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. | | Public method | EnsureCapacity | 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 method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | | Public method | GetByte | Gets a byte. | | Public method | GetBytes | Gets bytes. | | Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.) | | Public method | GetSlice | Gets a slice of this buffer. | | Public method | GetType | Gets the Type of the current instance. (Inherited from Object.) | | Public method | MakeReadOnly | Makes this buffer read only. | | Public method | SetByte | Sets a byte. | | Public method | SetBytes | Sets bytes. | | Public method | ToString | Returns a string that represents the current object. (Inherited from Object.) |

Top

Extension Methods

See Also

Reference