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

ADO
ADO DataTypes
ADO 摘要
ADO 实例

ADO Stream


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

Stream Object (ADO version 2.5)
记录流对象(ADO 2.5版本)

The ADO Stream Object is used to read, write, and manage a stream of binary data or text.
ADO Stream对象的作用是:对一个二进制数据或文本流进行读取、写入或管理。

A Stream object can be obtained in three ways:
Stream[记录流]对象中可以写在下面三种方法内:

  • From a URL pointing to a document, a folder, or a Record object
    指向一个文档、文件夹或一个记录对象的URL
  • By instantiating a Stream object to store data for your application
    通过一个记录流对象为你的应用程序存储数据
  • By opening the default Stream object associated with a Record object
    打开与一个记录对象相关的默认Sream[记录流]对象

Syntax
语法

objectname.property
objectname.method


Properties
属性

Property属性 Description描述
CharSet Sets or returns a value that specifies into which character set the contents are to be translated. This property is only used with text Stream objects (type is adTypeText)
在字符属性[character set]中设置或返回一个用于转换内容字符的值。该属性尽可以用在文本记录流中(类型为adTypeText)
EOS Returns whether the current position is at the end of the stream or not
返回当前位置是否位于记录流最末端
LineSeparator Sets or returns the line separator character used in a text Stream object
设置或返回在一个文本记录流对象中使用的分割字符
Mode Sets or returns the available permissions for modifying data
设置或返回数据修改所允许的权限
Position Sets or returns the current position (in bytes) from the beginning of a Stream object
设置或返回位于记录流的当前位置(从记录流对象的起始位置算起,以字节数的形式表示)
Size Returns the size of an open Stream object
返回一个已经打开的记录流对象的尺寸大小
State Returns a value describing if the Stream object is open or closed
返回一个用于描述记录流对象是否被打开或关闭的值
Type Sets or returns the type of data in a Stream object
设置或返回记录流对象中的数据类型

Methods
方法

Method方法 Description描述
Cancel Cancels an execution of an Open call on a Stream object
取消执行打开记录流对象请求的指令
Close Closes a Stream object
关闭一个记录流对象
CopyTo Copies a specified number of characters/bytes from one Stream object into another Stream object
从一个记录流对象中复制制定数目的字符/字节数到另一个记录流对象中
Flush Sends the contents of the Stream buffer to the associated underlying object
将记录流缓冲内容发送至与之相关的下一个对象中
LoadFromFile Loads the contents of a file into a Stream object
将一个文件的内容装载入一个记录流对象中
Open Opens a Stream object
打开一个记录流对象
Read Reads the entire stream or a specified number of bytes from a binary Stream object
从一个二进制记录流对象中读出指定字节数的内容或整段记录流
ReadText Reads the entire stream, a line, or a specified number of characters from a text Stream object
从一个文本记录流对象中读出一行或是指定数量的字符或是整段记录流内容
SaveToFile Saves the binary contents of a Stream object to a file
将记录流对象的二进制内容保存到一个文件中
SetEOS Sets the current position to be the end of the stream (EOS)
将当前位置设置为记录流的末尾
SkipLine Skips a line when reading a text Stream
当读取一个文本记录流对象时跳过一行
Write Writes binary data to a binary Stream object
将二进制数据写到二进制记录流对象中
WriteText Writes character data to a text Stream object
将字符数据写到文本记录流对象中

评论 (0) All

登陆 | 还没注册?