IsolatedStorageFileStream.Write 方法
定义
重载
| Write(ReadOnlySpan<Byte>) |
使用从缓冲区(由只读字节范围组成)读取的数据将字节块写入独立存储文件流对象。Writes a block of bytes to the isolated storage file stream object using data read from a buffer consisting of a read-only byte span. |
| Write(Byte[], Int32, Int32) |
使用从缓冲区(由字节数组组成)读取的数据将字节块写入独立存储文件流对象。Writes a block of bytes to the isolated storage file stream object using data read from a buffer consisting of a byte array. |
Write(ReadOnlySpan<Byte>)
使用从缓冲区(由只读字节范围组成)读取的数据将字节块写入独立存储文件流对象。Writes a block of bytes to the isolated storage file stream object using data read from a buffer consisting of a read-only byte span.
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>
要从中将字节复制到当前独立存储文件流的只读字节范围。The read-only byte span from which to copy bytes to the current isolated storage file stream.
适用于
Write(Byte[], Int32, Int32)
使用从缓冲区(由字节数组组成)读取的数据将字节块写入独立存储文件流对象。Writes a block of bytes to the isolated storage file stream object using data read from a buffer consisting of a byte array.
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[]
要从中将字节复制到当前独立存储文件流的字节数组。The byte array from which to copy bytes to the current isolated storage file stream.
- offset
- Int32
buffer 中的字节偏移量,从此处开始。The byte offset in buffer from which to begin.
- count
- Int32
最多写入的字节数。The maximum number of bytes to write.
例外
写入尝试次数超过了 IsolatedStorageFileStream 对象的配额。The write attempt exceeds the quota for the IsolatedStorageFileStream object.
注解
如果写入操作成功,则对象的当前位置 IsolatedStorageFileStream 将按写入的字节数提前。If the write operation is successful, the current position of the IsolatedStorageFileStream object is advanced by the number of bytes written. 如果发生异常,则对象的当前位置 IsolatedStorageFileStream 不变。If an exception occurs, the current position of the IsolatedStorageFileStream object is unchanged.