Stream.Write 方法
来源:互联网 发布:amd ryzen游戏优化 编辑:程序博客网 时间:2024/06/08 05:53
Stream.Write 方法
.NET Framework 4.5
其他版本
当在派生类中重写时,向当前流中写入字节序列,并将此流中的当前位置提升写入的字节数。
程序集: mscorlib(在 mscorlib.dll 中)
语法
C#
C++
F#
VB
public abstract void Write(byte[] buffer,int offset,int count)
参数
- buffer
- 类型:System.Byte[]
字节数组。 此方法将 count 个字节从 buffer 复制到当前流。
- offset
- 类型:System.Int32
buffer 中的从零开始的字节偏移量,从此处开始将字节复制到当前流。
- count
- 类型:System.Int32
要写入当前流的字节数。
备注
使用 CanWrite 属性可确定当前实例是否支持写入。 使用 WriteAsync 方法编写异步到当前流。
如果写操作成功,则流中的位置将提升写入的字节数。 如果出现异常,则流中的位置保持不变。
版本信息
.NET Framework
受以下版本支持:4.5、4、3.5、3.0、2.0、1.1、1.0.NET Framework Client Profile
受以下版本支持:4、3.5 SP1可移植类库
受以下版本支持:可移植类库适用于 Windows 应用商店应用的 .NET
受以下版本支持:Windows 8平台
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008(不支持服务器核心角色), Windows Server 2008 R2(支持带 SP1 或更高版本的服务器核心角色;不支持 Itanium)
并不是.NET Framework 对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求.请参阅
参考
Stream类
System.IO 命名空间
其他资源
文件和流 I/O
如何:从文件读取文本
如何:向文件写入文本
0 0
- Stream.Write 方法
- Stream.Write 与 StreamWriter.Write 的不同
- 黑马程序员之C#学习笔记: 使用Stream.Write方法向流中写字节数组
- Serialize / Stream (Read/Write) Configuration Settings
- Java中各种Stream和Reader,write
- 浅析企业级SSD Multi-Stream Write技术
- vlc 录制 stream方法
- Stream.Read 方法
- std::stream读写方法
- 浅谈 Stream.Read 方法
- std::stream读写方法
- Java8 Stream常用方法
- FileStream、Stream 的 Read 与 Write 的工作原理浅谈
- how to write a nginx module for http living stream
- Exception class EWriteError with message 'Stream write error'.
- js:document.write()方法
- Document write()、writeln()方法
- js write()方法学习
- qml Rectangle中clip属性效果
- 浅议指针
- 移动前端开发人员必知必会:移动设备概述
- OC-内存管理的一些要点
- queue用法
- Stream.Write 方法
- Thoughts of learning data structure
- 试装memcachedb、memcacheq,整理了下安装过程
- Web_JavaScript_JS邮件发送;
- 第一份工作中自己的经验与教训
- [LeetCode25]Reverse Nodes in k-Group
- myeclipes代码提示异常提示
- 黑马程序员_学习笔记08-异常处理
- LeetCode:Same Tree