当前位置: 首页 > 网络学院 > 服务端脚本教程 > ADO > ADO Write 方法

ADO
ADO DataTypes
ADO 摘要
ADO 实例

ADO Write 方法


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 372 ::
收藏到网摘: n/a

The Write method is used to write binary data to a binary Stream object.
Write的作用是:向一个二进制记录流对象中写入二进制数据。

If there is data in the Stream object and the current position is EOS, the new data will be appended beyond the existing data. If the current position is not EOS, the existing data will be overwritten. 
如果该数据是记录流对象中的数据,并且当前位置已处于末尾[EOS],那么新数据将被追加到现有数据的后面。如果当前位置未处于文件末尾[EOS],那么现有数据将被覆盖。

If you write past EOS, the size of the Stream will increase. EOS will be set to the last byte in the Stream. If you don't write past EOS, the current position will be set to the next byte after the newly added data. Previously existing data will not be truncated. Call the SetEOS method to truncate. 
如果你写入的内容超过了文件的末尾[EOS],那么记录流对象的尺寸将增加,EOS将被设置到记录流对象的最末字节处;如果你写入的内容未超过文件的末尾[EOS],那么当前位置将设置在新添加数据之后的在下一个字节处。先前现存的数据将被截去。可通过请求SetEOS方法截取。

Note: This method is used only with binary Stream objects, for textStream objects, use the WriteText method.
注意:这个方法仅用在二进制记录流对象中[binary Stream objects];如果需要对文本记录流对象进行操作[text Stream objects],那么需要使用WriteText方法。

Syntax
语法

objStream.Write buffer

Parameter参数 Description描述
buffer Required. An array of bytes to be written to a binary Stream object
必要参数。指定需要写入一个二进制记录流对象中的字节数组

评论 (0) All

登陆 | 还没注册?