public sealed class ByteBlock : IByteBlock,
IByteBlockReader, IBytesReader, IByteBlockCore, IByteBlockWriter, IBytesWriter,
IBufferWriter<byte>, IDisposablePublic NotInheritable Class ByteBlock
Implements IByteBlock, IByteBlockReader, IBytesReader, IByteBlockCore,
IByteBlockWriter, IBytesWriter, IBufferWriter(Of Byte), IDisposable[<SealedAttribute>]
type ByteBlock =
class
interface IByteBlock
interface IByteBlockReader
interface IBytesReader
interface IByteBlockCore
interface IByteBlockWriter
interface IBytesWriter
interface IBufferWriter<byte>
interface IDisposable
end| ByteBlock(Int32) | 使用指定容量初始化ByteBlock的新实例,使用默认的ArrayPoolT进行内存管理。 |
| ByteBlock(MemoryByte) | 使用指定内存块初始化ByteBlock的新实例。 |
| ByteBlock(Int32, FuncInt32, MemoryByte, ActionMemoryByte) | 使用指定容量和内存管理委托初始化ByteBlock的新实例。 |
| BytesRead | 获取或设置已读取的字节数。 |
| BytesRemaining | 获取剩余可读取的字节数。 |
| CanReadLength | 获取当前可读取的字节长度。 |
| Capacity | 获取字节块的总容量。 |
| FreeLength | 获取字节块的可用空间长度。 |
| Length | 获取字节块中有效数据的长度。 |
| Memory | 获取字节块的只读内存表示形式。 |
| Position | 获取或设置字节块中的当前位置。 |
| Sequence | 获取当前可读取的字节序列。 |
| Span | 获取字节块的只读跨度表示形式。 |
| SupportsRewind | 获取一个值,该值指示写入器是否支持回退操作。 |
| TotalMemory | 获取字节块的完整内存表示形式。 |
| TotalSequence | 获取总的字节序列。 |
| Using | 获取一个值,该值指示字节块当前是否正在使用中。 |
| Version | 获取写入器的版本号。 |
| Advance | 推进指定数量的字节。 |
| Clear | 清除字节块中的所有数据,将所有字节设置为零。 |
| Dispose | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
| Equals | Determines whether the specified object is equal to the current object. (继承自 Object。) |
| ExtendSize | 扩展内存块大小以满足指定的空间需求。 |
| GetHashCode | Serves as the default hash function. (继承自 Object。) |
| GetMemory | Returns a MemoryT to write to that is at least the requested size (specified by sizeHint). |
| GetSpan | Returns a SpanT to write to that is at least the requested size (specified by sizeHint). |
| GetType | Gets the Type of the current instance. (继承自 Object。) |
| Read | 读取字节到指定的跨度中。 |
| Reset | 重置字节块到初始状态,将位置和长度重置为零。 |
| SeekToEnd | 将位置设置到数据末尾。 |
| SeekToStart | 将位置设置到数据开头。 |
| SetHolding | 设置字节块的持有状态,防止在特定情况下被意外释放。 |
| SetLength | 设置字节块的有效数据长度。 |
| ToString |
返回当前字节块的UTF-8字符串表示形式。
(重写 ObjectToString) |
| Write | 将指定的字节跨度写入到写入器中。 |
| IBytesReaderGetMemory | 获取指定数量的只读内存字节块。 |
| IBytesReaderGetSpan | 获取指定数量的只读字节跨度。 |
| IBytesWriterWrittenCount | 获取已写入的字节总数。 |