TStrings.SaveToStream¶
Save the contents of the string to a stream.
Declaration¶
Source position: classesh.inc line 1162
public
procedure SaveToStream(Stream: TStream); virtual; overload; overload;
procedure SaveToStream(Stream: TStream; IgnoreEncoding: Boolean)
; overload; overload;
procedure SaveToStream(Stream: TStream; AEncoding: TEncoding); virtual
; overload; overload;
Description¶
SaveToStream saves the contents of the stringlist to Stream. It writes the strings to the stream, separated by end-of-line markers, so each 'line' in the stream will contain 1 string from the stringlist.
Errors¶
An EStreamError exception can be raised if the stream cannot be written to.
See also¶
| Name | Description |
|---|---|
| TStrings.SaveToFile | Save the contents of the list to a file. |
| Tstrings.LoadFromStream | Load the contents of a stream as a series of strings. |
| TStrings.LoadFromFile | Load the contents of a file as a series of strings. |