ADO Stream object
ADO Stream object
Stream object (ADO version 2.5)
The ADO Stream object is used for reading, writing, and processing binary or text streams.
A Stream object can be obtained in three ways:
- Via a URL pointing to an object containing binary or text data. 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 an application. Unlike the default Stream associated with a URL or Record, an instantiated Stream is not associated with a base source by default.
- By opening the default Stream object associated with a Record object. The default stream associated with a Record object is obtained when the Record is opened. Opening the stream is sufficient to complete a round trip.
Syntax
objectname.property
objectname.method
Property
| Property | Description |
|---|---|
| CharSet | Specifies the character set used to store the Stream. |
| EOS | Returns whether the current position is at the end of the stream. |
| LineSeparator | Sets or returns the line separator used in a Text Stream object. |
| Mode | Sets or returns the available permissions for modifying data. |
| Position | Sets or returns the current position from the beginning of the Stream object (in bytes). |
| 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 data type in the Stream object. |
Method
| Method | Description |
|---|---|
| Cancel | Cancels the execution of the Open call on a Stream object. |
| Close | Closes a Stream object. |
| CopyTo | Copies a specified number of characters/bits from one Stream object to another Stream object. |
| Flush | Send the content in the Stream buffer to the associated lower-level object. |
| LoadFromFile | Load the content of the file into the Stream object. |
| Open | Open a Stream object. |
| Read | Read the entire stream or a specified number of bytes from a binary Stream object. |
| ReadText | Read all the stream, a line, or a specified number of bytes from a text Stream object. |
| SaveToFile | Save the binary content of a Stream object to a file. |
| SetEOS | Set the current position to the end of the stream (EOS). |
| SkipLine | Skip a line when reading a text stream. |
| Write | Write binary data to a binary Stream object. |
| WriteText | Write character data to a text Stream object. |