Buffer Buffer Buffer Buffer Buffer Class

Definition

Provides a default implementation of the IBuffer interface and its related interfaces.

public : sealed class Buffer : IBuffer
struct winrt::Windows::Storage::Streams::Buffer : IBuffer
public sealed class Buffer : IBuffer
Public NotInheritable Class Buffer Implements IBuffer
var buffer = new buffer(capacity);
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

For more info, see Create, write, and read a file, which shows how to read and write bytes to a file by using a Buffer.

Constructors

Buffer(UInt32) Buffer(UInt32) Buffer(UInt32) Buffer(UInt32) Buffer(UInt32)

Initializes a new instance of the Buffer class with the specified capacity.

Properties

Capacity Capacity Capacity Capacity Capacity

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

Length Length Length Length Length

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

Methods

CreateCopyFromMemoryBuffer(IMemoryBuffer) CreateCopyFromMemoryBuffer(IMemoryBuffer) CreateCopyFromMemoryBuffer(IMemoryBuffer) CreateCopyFromMemoryBuffer(IMemoryBuffer) CreateCopyFromMemoryBuffer(IMemoryBuffer)

Creates a new buffer containing a copy of a specified buffer.

CreateMemoryBufferOverIBuffer(IBuffer) CreateMemoryBufferOverIBuffer(IBuffer) CreateMemoryBufferOverIBuffer(IBuffer) CreateMemoryBufferOverIBuffer(IBuffer) CreateMemoryBufferOverIBuffer(IBuffer)

Creates a MemoryBuffer from an existing IBuffer.

See Also