一款简单易用的基础网络通讯组件库。

IByteBlockWriter 接口

表示字节块写入器接口,提供字节块的写入功能和容量管理。 继承自IBytesWriterIByteBlockCore接口。

Definition

命名空间: TouchSocket.Core
程序集: TouchSocket.Core (在 TouchSocket.Core.dll 中) 版本:4.0.0-beta.143+5fcca7a4e70968794985dc3793adc50531308be6
C#
public interface IByteBlockWriter : IBytesWriter, 
	IBufferWriter<byte>, IByteBlockCore
Implements
IBufferWriterByte, IByteBlockCore, IBytesWriter

备注

IByteBlockWriter接口结合了通用字节写入和字节块核心功能, 为字节块的写入操作提供了专门的接口定义,并增加了容量管理能力。

属性

Capacity 获取字节块的总容量。
FreeLength 获取字节块的可用空间长度。
Length 获取字节块中有效数据的长度。
(继承自 IByteBlockCore。)
Memory 获取字节块的只读内存表示形式。
(继承自 IByteBlockCore。)
Position 获取或设置字节块中的当前位置。
(继承自 IByteBlockCore。)
Span 获取字节块的只读跨度表示形式。
(继承自 IByteBlockCore。)
SupportsRewind 获取一个值,该值指示写入器是否支持回退操作。
(继承自 IBytesWriter。)
TotalMemory 获取字节块的完整内存表示形式。
Version 获取写入器的版本号。
(继承自 IBytesWriter。)
WrittenCount 获取已写入的字节总数。
(继承自 IBytesWriter。)

方法

AdvanceNotifies the IBufferWriterT that count data items were written to the output SpanT or MemoryT.
(继承自 IBufferWriterByte。)
GetMemoryReturns a MemoryT to write to that is at least the requested size (specified by sizeHint).
(继承自 IBufferWriterByte。)
GetSpanReturns a SpanT to write to that is at least the requested size (specified by sizeHint).
(继承自 IBufferWriterByte。)
SetLength 设置字节块的有效数据长度。
Write 将指定的字节跨度写入到写入器中。
(继承自 IBytesWriter。)

参见