IBuffer IBuffer IBuffer IBuffer IBuffer Interface


Represents a referenced array of bytes used by byte stream read and write interfaces. Buffer is the class implementation of this interface.

public : interface IBuffer
struct winrt::Windows::Storage::Streams::IBuffer
public interface IBuffer
Public Interface IBuffer
// You can't instantiate an interface directly in JavaScript. You can use objects that implement the interface, however.
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)


For more info, see Quickstart: Reading and writing a file, which shows how to read and write bytes to a file by using a Buffer.


Capacity Capacity Capacity Capacity Capacity

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

public : unsigned int Capacity { get; }
uint32_t Capacity();
public uint Capacity { get; }
Public ReadOnly Property Capacity As uint
var uint = iBuffer.capacity;
uint uint uint

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.

public : unsigned int Length { get; set; }
uint32_t Length(); void Length(uint32_t length);
public uint Length { get; set; }
Public ReadWrite Property Length As uint
var uint = iBuffer.length;
iBuffer.length = uint;
uint uint uint

The number of bytes currently in use in the buffer which is less than or equal to the capacity of the buffer.

See Also