BrotliStream.Write 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| Write(ReadOnlySpan<Byte>) |
从只读字节范围将字节序列写入当前 Brotli 流,并将此 Brotli 流中的当前位置通过写入的字节数推进。 |
| Write(Byte[], Int32, Int32) |
将压缩的字节从指定的字节数组写入基础流。 |
Write(ReadOnlySpan<Byte>)
- Source:
- BrotliStream.Compress.cs
- Source:
- BrotliStream.Compress.cs
- Source:
- BrotliStream.Compress.cs
- Source:
- BrotliStream.Compress.cs
- Source:
- BrotliStream.Compress.cs
从只读字节范围将字节序列写入当前 Brotli 流,并将此 Brotli 流中的当前位置通过写入的字节数推进。
public:
override void Write(ReadOnlySpan<System::Byte> buffer);
public override void Write(ReadOnlySpan<byte> buffer);
override this.Write : ReadOnlySpan<byte> -> unit
Public Overrides Sub Write (buffer As ReadOnlySpan(Of Byte))
参数
- buffer
- ReadOnlySpan<Byte>
内存区域。 此方法将该区域的内容复制到当前的 Brotli 流。
注解
使用 CanWrite 属性确定当前实例是否支持写入。
System.IO.Compression.BrotliStream.WriteAsync使用该方法以异步方式写入当前流。
如果写入操作成功,Brotli 流中的位置会按写入的字节数向前推进。 如果发生异常,Brotli 流中的位置保持不变。
适用于
Write(Byte[], Int32, Int32)
- Source:
- BrotliStream.Compress.cs
- Source:
- BrotliStream.Compress.cs
- Source:
- BrotliStream.Compress.cs
- Source:
- BrotliStream.Compress.cs
- Source:
- BrotliStream.Compress.cs
将压缩的字节从指定的字节数组写入基础流。
public:
override void Write(cli::array <System::Byte> ^ buffer, int offset, int count);
public override void Write(byte[] buffer, int offset, int count);
override this.Write : byte[] * int * int -> unit
Public Overrides Sub Write (buffer As Byte(), offset As Integer, count As Integer)
参数
- buffer
- Byte[]
包含要压缩的数据的缓冲区。
- offset
- Int32
要从中 buffer 读取字节的字节偏移量。
- count
- Int32
要写入的最大字节数。
例外
无法执行写入操作,因为流已关闭。