public sealed class ByteBlockStream : Stream
Public NotInheritable Class ByteBlockStream
Inherits Stream
[<SealedAttribute>]
type ByteBlockStream =
class
inherit Stream
end
ByteBlockStream | 初始化 ByteBlockStream 类的新实例。 |
ByteBlock | 获取此实例关联的 ByteBlock 对象。 |
CanRead |
仅当内存块可用,且CanReadLength>0时为True。
(重写 StreamCanRead) |
CanReadLength | 还能读取的长度,计算为Length与Position的差值。 |
CanSeek |
支持查找
(重写 StreamCanSeek) |
CanTimeout | Gets a value that determines whether the current stream can time out. (继承自 Stream。) |
CanWrite |
可写入
(重写 StreamCanWrite) |
Capacity | 容量 |
FreeLength | 空闲长度,准确掌握该值,可以避免内存扩展,计算为Capacity与Position的差值。 |
Length |
真实长度
(重写 StreamLength) |
Position |
流位置
(重写 StreamPosition) |
ReadTimeout | Gets or sets a value, in milliseconds, that determines how long the stream will attempt to read before timing out. (继承自 Stream。) |
Using | 使用状态 |
WriteTimeout | Gets or sets a value, in milliseconds, that determines how long the stream will attempt to write before timing out. (继承自 Stream。) |
BeginRead | Begins an asynchronous read operation. (Consider using ReadAsync(Byte, Int32, Int32) instead.) (继承自 Stream。) |
BeginWrite | Begins an asynchronous write operation. (Consider using WriteAsync(Byte, Int32, Int32) instead.) (继承自 Stream。) |
Clear | 清空所有内存数据 |
Close | Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream. Instead of calling this method, ensure that the stream is properly disposed. (继承自 Stream。) |
CopyTo(Stream) | Reads the bytes from the current stream and writes them to another stream. (继承自 Stream。) |
CopyTo(Stream, Int32) | Reads the bytes from the current stream and writes them to another stream, using a specified buffer size. (继承自 Stream。) |
CopyToAsync(Stream) | Asynchronously reads the bytes from the current stream and writes them to another stream. (继承自 Stream。) |
CopyToAsync(Stream, Int32) | Asynchronously reads the bytes from the current stream and writes them to another stream, using a specified buffer size. (继承自 Stream。) |
CopyToAsync(Stream, CancellationToken) | Asynchronously reads the bytes from the current stream and writes them to another stream, using a specified cancellation token. (继承自 Stream。) |
CopyToAsync(Stream, Int32, CancellationToken) | Asynchronously reads the bytes from the current stream and writes them to another stream, using a specified buffer size and cancellation token. (继承自 Stream。) |
Dispose | Releases all resources used by the Stream. (继承自 Stream。) |
DisposeAsync | Asynchronously releases the unmanaged resources used by the Stream. (继承自 Stream。) |
EndRead | Waits for the pending asynchronous read to complete. (Consider using ReadAsync(Byte, Int32, Int32) instead.) (继承自 Stream。) |
EndWrite | Ends an asynchronous write operation. (Consider using WriteAsync(Byte, Int32, Int32) instead.) (继承自 Stream。) |
Equals | Determines whether the specified object is equal to the current object. (继承自 Object。) |
Flush |
无实际效果
(重写 StreamFlush) |
FlushAsync | Asynchronously clears all buffers for this stream and causes any buffered data to be written to the underlying device. (继承自 Stream。) |
FlushAsync(CancellationToken) | Asynchronously clears all buffers for this stream, causes any buffered data to be written to the underlying device, and monitors cancellation requests. (继承自 Stream。) |
GetHashCode | Serves as the default hash function. (继承自 Object。) |
GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (继承自 MarshalByRefObject。) 已过时。 |
GetType | Gets the Type of the current instance. (继承自 Object。) |
InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (继承自 MarshalByRefObject。) 已过时。 |
Read(SpanByte) | When overridden in a derived class, reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. (继承自 Stream。) |
Read(Byte, Int32, Int32) |
读取数据,然后递增Pos
(重写 StreamRead(Byte, Int32, Int32)) |
ReadAsync(MemoryByte, CancellationToken) | Asynchronously reads a sequence of bytes from the current stream, advances the position within the stream by the number of bytes read, and monitors cancellation requests. (继承自 Stream。) |
ReadAsync(Byte, Int32, Int32) | Asynchronously reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. (继承自 Stream。) |
ReadAsync(Byte, Int32, Int32, CancellationToken) | Asynchronously reads a sequence of bytes from the current stream, advances the position within the stream by the number of bytes read, and monitors cancellation requests. (继承自 Stream。) |
ReadByte |
从当前流位置读取一个Byte值
(重写 StreamReadByte) |
Seek(Int32) | 移动游标 |
Seek(Int64, SeekOrigin) |
设置流位置
(重写 StreamSeek(Int64, SeekOrigin)) |
SeekToEnd | 设置游标到末位 |
SeekToStart | 设置游标到首位 |
SetLength |
设置实际长度
(重写 StreamSetLength(Int64)) |
ToArray | 转换为有效内存。本操作不递增Position |
ToArray(Int32) | 从指定位置转为有效内存。本操作不递增Position |
ToArray(Int32, Int32) | 从指定位置转化到指定长度的有效内存。本操作不递增Position |
ToArrayTake | 将当前Position至指定长度转化为有效内存。本操作不递增Position |
ToString | Returns a string that represents the current object. (继承自 Object。) |
Write(ReadOnlySpanByte) | When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. (继承自 Stream。) |
Write(Byte, Int32, Int32) |
写入
(重写 StreamWrite(Byte, Int32, Int32)) |
WriteAsync(ReadOnlyMemoryByte, CancellationToken) | Asynchronously writes a sequence of bytes to the current stream, advances the current position within this stream by the number of bytes written, and monitors cancellation requests. (继承自 Stream。) |
WriteAsync(Byte, Int32, Int32) | Asynchronously writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. (继承自 Stream。) |
WriteAsync(Byte, Int32, Int32, CancellationToken) | Asynchronously writes a sequence of bytes to the current stream, advances the current position within this stream by the number of bytes written, and monitors cancellation requests. (继承自 Stream。) |
WriteByte | Writes a byte to the current position in the stream and advances the position within the stream by one byte. (继承自 Stream。) |
Map | (由 Mapper 定义。) |
Map | (由 Mapper 定义。) |
MapTTarget | (由 Mapper 定义。) |
ToJsonString |
转换为Json
(由 SerializeConvert 定义。) |