Display Preferences
System.Classes.TStream.WriteBuffer
From XE2 API Documentation
Delphi
procedure WriteBuffer(const Buffer; Count: Longint);
C++
void __fastcall WriteBuffer(const void *Buffer, int Count);
Properties
| Type | Visibility | Source | Unit | Parent |
|---|---|---|---|---|
procedure function |
public | System.Classes.pas System.Classes.hpp |
System.Classes | TStream |
Description
Writes Count bytes from Buffer onto the stream and advances the current position of the stream by Count bytes.
Use WriteBuffer to save data to a stream. WriteBuffer and ReadBuffer are used in cases where the number of bytes is known and required, for example when reading in structures. Use WriteBuffer for standard file I/O streaming.
WriteBuffer is used internally for writing to a stream and copying from a stream. It is used by other objects, such as strings and lists, for writing strings stored in a buffer.
WriteBuffer calls Write to handle the actual writing. If the stream fails to write all the requested bytes, an EWriteError exception is raised.