TECLMemoryStream.Write
TECLMemoryStream
Writes Count bytes from Buffer to the current position in the memory buffer with transparent compression and updates the current position by Count bytes.
function Write(const Buffer; Count: Longint): Longint; override;
Description
Use Write to insert Count bytes into the memory buffer of the memory stream with transparent compression, starting at the current position. Write will increase the size of the memory buffer, if necessary, to accommodate the data being written. If the current position is not the end of the memory buffer, Write will overwrite the data following the current position.
Write updates the Size property to Position + Count, and sets the Position property to the new value of Size. Thus, any data that was stored in the memory stream in the Count bytes after the current position is lost when calling Write.
Write always writes the Count bytes in the Buffer, unless there is a memory failure. Thus, for TECLMemoryStream, Write is equivalent to the WriteBuffer method.
All other data-writing methods of a memory stream (WriteBuffer, WriteComponent) call Write to do the actual writing.
|