FireDAC.Comp.DataSet.TFDBlobStream.Write

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function Write(const ABuffer; ACount: Longint): Longint; override;
function Write(const ABuffer: TBytes; AOffset, ACount: Longint): Longint; override;

C++

virtual int __fastcall Write(const void *ABuffer, int ACount)/* overload */;
virtual int __fastcall Write(const System::DynamicArray<System::Byte> ABuffer, int AOffset, int ACount)/* overload */;
inline int __fastcall  Write(const System::DynamicArray<System::Byte> Buffer, int Count){ return System::Classes::TStream::Write(Buffer, Count); }

Properties

Type Visibility Source Unit Parent
function public
FireDAC.Comp.DataSet.pas
FireDAC.Comp.DataSet.hpp
FireDAC.Comp.DataSet TFDBlobStream

Description

Writes Count bytes from Buffer to the current position in the memory buffer and updates the current position by Count bytes.

FireDAC.Comp.DataSet.TFDBlobStream.Write inherits from System.Classes.TMemoryStream.Write. All content below this line refers to System.Classes.TMemoryStream.Write.

Writes Count bytes from Buffer to the current position in the memory buffer and updates the current position by Count bytes.

Use Write to insert Count bytes into the memory buffer of the memory stream, starting at the current position. Write will increase the size of the memory buffer, if necessary, to accommodate the data being written in. 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 TMemoryStream, 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.

See Also