[Overview][Constants][Types][Classes][Procedures and functions][Variables] |
Writes the contents of the memory stream to another stream.
Source position: classesh.inc line 679
public procedure TCustomMemoryStream.SaveToStream( |
Stream: TStream |
); |
SaveToStreamwrites the contents of the memory stream to Stream. The content of Streamis not cleared first. The current position of the memory stream is not changed by this action.
Remark: | This method will work much faster than the use of the TStream.CopyFrommethod: Seek(0,soFromBeginning); Stream.CopyFrom(Self,Size); because the CopyFrommethod copies the contents in blocks, while SaveToStreamwrites the contents of the memory as one big block. |
If an error occurs when writing to Streaman EStreamErrorexception will be raised.
|
Writes the contents of the stream to a file. |
|
|
Copy data from one stream to another |