[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Writes the contents of the memory stream to another stream.
Source position: classesh.inc line 1051
public procedure TCustomMemoryStream.SaveToStream( |
Stream: TStream |
); |
SaveToStream writes the contents of the memory stream to Stream. The content of Stream is 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.CopyFrom method: Seek(0,soFromBeginning); Stream.CopyFrom(Self,Size); because the CopyFrom method copies the contents in blocks, while SaveToStream writes the contents of the memory as one big block. |
If an error occurs when writing to Stream an EStreamError exception will be raised.
|
Writes the contents of the stream to a file. |
|
|
Copy data from one stream to another |