System.WideStrings.TWideStrings.LoadFromStream

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure LoadFromStream(Stream: TStream); overload; virtual;
procedure LoadFromStream(Stream: TStream; Encoding: TEncoding); overload; virtual;

C++

virtual void __fastcall LoadFromStream(System::Classes::TStream* Stream)/* overload */;
virtual void __fastcall LoadFromStream(System::Classes::TStream* Stream, System::Sysutils::TEncoding* Encoding)/* overload */;

Properties

Type Visibility Source Unit Parent
procedure
function
public
System.WideStrings.pas
System.WideStrings.hpp
System.WideStrings TWideStrings

Description

Fills the list with lines of text read from a stream.

Call LoadFromStream to fill the list of the TWideStrings object from the stream specified by Stream. The text read from the stream is parsed into strings separated by carriage return or linefeed characters. Thus, LoadFromStream reads the value of the Text property.

If the Encoding parameter is not given, then the strings are loaded using the appropriate encoding. The value of the encoding is obtained by calling the GetBufferEncoding routine of the TEncoding class.

If the stream is a file stream, LoadFromStream does the same thing as LoadFromFile, except the application must create and destroy the file stream.

See Also