Data.SqlExpr.TSQLBlobStream.Read

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function Read(Buffer: TBytes; Offset, Count: Longint): Longint; overload; override;
function Read(var Buffer; Count: Longint): Longint; overload; override; deprecated 'Use overloaded method instead';

C++

virtual int __fastcall Read(System::DynamicArray<System::Byte> Buffer, int Offset, int Count)/* overload */;
virtual int __fastcall Read _DEPRECATED_ATTRIBUTE1("Use overloaded method instead") (void *Buffer, int Count)/* overload */;
inline int __fastcall  Read(System::DynamicArray<System::Byte> &Buffer, int Count){ return System::Classes::TStream::Read(Buffer, Count); }

Properties

Type Visibility Source Unit Parent
function public
Data.SqlExpr.pas
Data.SqlExpr.hpp
Data.SqlExpr TSQLBlobStream

Description

Reads up to Count bytes from the memory stream into Buffer and advances the current position of the stream by the number of bytes read.

Data.SqlExpr.TSQLBlobStream.Read inherits from System.Classes.TCustomMemoryStream.Read. All content below this line refers to System.Classes.TCustomMemoryStream.Read.

Reads up to Count bytes from the memory stream into Buffer and advances the current position of the stream by the number of bytes read.

Use Read to read the contents of the memory stream into a buffer, starting at the current position. Read will read up to Count bytes from the current position in Memory. If Count bytes extends beyond the end of the memory buffer, Read will only transfer the data up to the end of the associated memory buffer. Read returns the number of bytes actually transferred to Buffer, and advances the current position accordingly. If the return value is less than Count, it means that reading reached the end of the stream data.

All the other data-reading methods of the memory stream (ReadBuffer, ReadComponent) call Read to do the actual reading.

Note: Read treats Count as an upper bound. The ReadBuffer method, by contrast, raises an exception if Count bytes cannot be read.

See Also