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

PooledBytesReader 类

表示一个使用内存池的字节读取器。 Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.

Definition

命名空间: TouchSocket.Core
程序集: TouchSocket.Core (在 TouchSocket.Core.dll 中) 版本:4.1.4.7+7f7e1f78093c99347956e09330d5d7aca1d2bdf2
C#
public sealed class PooledBytesReader : IDisposable, 
	IBytesReader
Inheritance
Object    PooledBytesReader
Implements
IDisposable, IBytesReader

构造函数

PooledBytesReader初始化 PooledBytesReader 类的一个新实例

属性

BytesRead 获取或设置已读取的字节数。
BytesRemaining 获取剩余可读取的字节数。
Sequence 获取当前可读取的字节序列。
TotalSequence 获取总的字节序列。

方法

Advance 推进指定数量的字节。
Clear 清理内存所有者。
DisposePerforms application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
EqualsDetermines whether the specified object is equal to the current object.
(继承自 Object。)
GetHashCodeServes as the default hash function.
(继承自 Object。)
GetMemory 获取指定数量的只读内存字节块。
GetSpan 获取指定数量的只读字节跨度。
GetTypeGets the Type of the current instance.
(继承自 Object。)
Read 读取字节到指定的跨度中。
Reset(ReadOnlyMemoryByte) 重置读取器,使用新的只读内存。
Reset(ReadOnlySequenceByte) 重置读取器,使用新的字节序列。
ToStringReturns a string that represents the current object.
(继承自 Object。)

扩展方法

SafeDispose 安全性释放(不用判断对象是否为空)。不会抛出任何异常。
(由 SystemExtension 定义。)
ToJsonString 转换为Json
(由 SerializeConvert 定义。)

参见