Buffer 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
public ref class Buffer sealed : IBuffer
/// [Windows.Foundation.Metadata.Activatable(Windows.Storage.Streams.IBufferFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class Buffer final : IBuffer
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(Windows.Storage.Streams.IBufferFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class Buffer final : IBuffer
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Storage.Streams.IBufferFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class Buffer : IBuffer
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Storage.Streams.IBufferFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class Buffer : IBuffer
function Buffer(capacity)
Public NotInheritable Class Buffer
Implements IBuffer
- 繼承
- 屬性
- 實作
Windows 需求
裝置系列 |
Windows 10 (已於 10.0.10240.0 引進)
|
API contract |
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)
|
備註
如需詳細資訊,請參閱 建立、寫入和讀取檔案,其中示範如何使用 Buffer 讀取和寫入檔案的位元組。
建構函式
Buffer(UInt32) |
使用指定的容量,初始化 Buffer 類別的新實例。 |
屬性
Capacity |
取得緩衝區可以保存的最大位元組數目。 |
Length |
取得緩衝區中目前使用的位元組數目。 |
方法
CreateCopyFromMemoryBuffer(IMemoryBuffer) |
建立包含指定緩衝區複本的新緩衝區。 |
CreateMemoryBufferOverIBuffer(IBuffer) |
從現有的 IBuffer 建立 MemoryBuffer。 |