System.Classes.TStream.Write

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function Write(const Buffer; Count: Longint): Longint; overload; virtual;
function Write(const Buffer: TBytes; Offset, Count: Longint): Longint; overload; virtual;
function Write(const Buffer: TBytes; Count: Longint): Longint; overload;

C++

virtual int __fastcall Write(const void *Buffer, int Count)/* overload */;
virtual int __fastcall Write(const System::DynamicArray<System::Byte> Buffer, int Offset, int Count)/* overload */;
int __fastcall Write(const System::DynamicArray<System::Byte> Buffer, int Count)/* overload */;

Properties

Type Visibility Source Unit Parent
function public
System.Classes.pas
System.Classes.hpp
System.Classes TStream

Description

Methods responsible for writing up to Count bytes from Buffer to the stream.

Write attempts to write up to Count bytes from the Buffer to the current position in the stream, and returns the number of bytes written. After writing to the stream, Write advances the current position by the number of bytes written.

Offset specifies a zero-based position in Buffer of the first byte to write.

All other data-writing methods of a stream (WriteBuffer, WriteData) call Write to do their actual writing.

Each descendent stream object defines a Write method that writes data to its particular storage medium (such as memory or a disk file).

See Also