TStream and its immediate descendants are basically a low-level access class. Mostly they work with generator buffers. There are several more specialized classes that descend or use a thread to perform tasks of a higher level.
Since Delphi 1 TReader and TWriter can be used to directly read and write Delphi types (inlcuding strings), but they were not designed to handle line-oriented files (unfortunately, they were designed too much for the properties of the components, not as a universal structure).
Turbo Power SysTools has the TStAnsiTextStream class, which implements linear access to text files in the same way as TextFile. Since the new Delphi 2009 classes (see opc0de's answer) provide the same access without using third-party libraries (in addition, they support different encodings due to support for Delphi 2009 codepage support, including Unicode).
user160694
source share