ADO Stream Object

Stream objects (ADO version 2.5)

ADO Stream objects are used for reading and writing as well as processing binary data or text streams.

Stream objects can be obtained in three ways:

  • By pointing to the URL that contains an object containing binary or text data (usually a file). This object can be a simple document, a Record object representing a structured document, or a folder.
  • By instantiating the Stream object. These Stream objects can be used to store data for the application. Unlike the default Stream associated with the URL or the default Stream of the Record, the instantiated Stream is not associated with the basic source by default.
  • By opening the default Stream object associated with the Record object. The default stream associated with the Record object can be obtained when the Record is opened. Just opening the stream can delete a round trip process.

Syntax

objectname.property
objectname.method

Attribute

Attribute Description
CharSet Specify the character set used to store the Stream.
EOS Return whether the current position is at the end of the stream.
LineSeparator Set or return the line separator used in the text Stream object.
Mode Set or return the available permissions for modifying data.
Position Set or return the current position from the beginning of the Stream object (calculated in bytes).
Size Return the size of an open Stream object.
State Return a value describing whether the Stream is open or closed.
Type Set or return the data type of the data in the Stream object.

Method

Method Description
Cancel Cancel the execution of the Open call for the Stream object.
Close Close a Stream object.
CopyTo Copy a specified number of characters/bits from one Stream object to another.
Flush Send the content of the Stream buffer to the associated lower-level object.
LoadFromFile Load the content of a file into a 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 the entire 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.