CopyFrom

Declaration: TILabFStream.CopyFrom(const Source: TStream; Count: int64): int64;
The method CopyFrom copies a specified number of bytes from one stream to another. The parameter Source specified the sources stream, the parameter Count defines the number of bytes to be copied from the source stream. The data bytes are copied from the current Position of the source stream to the current position of the TILabFStream instance, thus overwriting all Count bytes from the current position to the current position plus Count. After the copy process the Position of both streams points to the first byte after the copied range.

If Count is set to zero CopyFrom sets source position to 0 before reading and then copies the entire contents of Source into the stream. If Count is greater than the source size an exception us thrown ("stream read error").