Table of Contents

Class Buffer

Namespace
nanoFramework.Device.Bluetooth
Assembly
nanoFramework.Device.Bluetooth.dll

Represents a referenced array of bytes used by byte stream read and write interfaces.

public class Buffer
Inheritance
Buffer
Derived
Inherited Members
Extension Methods

Constructors

Buffer(byte[])

Constructor for Buffer with an external byte buffer.

public Buffer(byte[] array)

Parameters

array byte[]

Buffer(uint)

Constructor for Buffer with a specific capacity.

public Buffer(uint capacity)

Parameters

capacity uint

Fields

_length

Length of data in byte buffer.

protected uint _length

Field Value

uint

Properties

Capacity

Gets the maximum number of bytes that the buffer can hold.

public uint Capacity { get; }

Property Value

uint

Length

Gets the number of bytes currently in use in the buffer.

public uint Length { get; set; }

Property Value

uint

Methods

EnsureCapacity(uint)

Ensure buffer has a certain capacity. If to small it will be expanded

public void EnsureCapacity(uint newCapacity)

Parameters

newCapacity uint

New capacity required