ADO Stream
Object
Stream Object (ADO version 2.5)
The ADO Stream object is used for reading, writing, and manipulating binary data or text streams.
A Stream object can be obtained in three ways:
By pointing to an object (usually a file) that contains binary or text data via a URL. This object can be a simple document, a Record object representing a structured document, or a folder.
By instantiating a Stream object. These Stream objects can be used to store data for the application. Unlike Streams associated with a URL or the default Stream of a Record, instantiated Streams are not associated with an underlying source by default.
By opening the default Stream object associated with a Record object. The default stream associated with a Record object can be obtained when the Record is opened. Opening this stream eliminates an extra round-trip.
Syntax
Properties
Property | Description |
---|---|
CharSet | Specifies the character set in which to store the Stream. |
EOS | Returns whether the current position is at the end of the stream. |
LineSeparator | Sets or returns the line separator character used in a text Stream object. |
Mode | Sets or returns the permissions available for modifying data. |
Position | Sets or returns the current position in the Stream object, measured in bytes from the beginning of the Stream. |
Size | Returns the size of an open Stream object. |
State | Returns a value describing whether the Stream is open or closed. |
Type | Sets or returns the type of data in the Stream object. |
Methods
Method | Description |
---|---|
Cancel | Cancels the execution of an Open call on the Stream object. |
Close | Closes a Stream object. |
CopyTo | Copies a specified number of characters/bits from one Stream object to another. |
Flush | Sends the contents of the Stream buffer to the underlying associated object. |
LoadFromFile | Loads the contents of a file into the 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 bytes from a text Stream object. |
SaveToFile | Saves the binary contents of a Stream object to a file. |
SetEOS | Sets the current position as 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. |