System.Classes.TStream.ReadBuffer

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

procedure ReadBuffer(var Buffer; Count: Longint); overload;
procedure ReadBuffer(var Buffer: TBytes; Count: Longint); overload;
procedure ReadBuffer(var Buffer: TBytes; Offset, Count: Longint); overload;

C++

void __fastcall ReadBuffer(void *Buffer, int Count)/* overload */;
void __fastcall ReadBuffer(System::DynamicArray<System::Byte> &Buffer, int Count)/* overload */;
void __fastcall ReadBuffer(System::DynamicArray<System::Byte> &Buffer, int Offset, int Count)/* overload */;

Properties

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

Description

Reads bytes from the stream into Buffer.

Use ReadBuffer to read Count bytes from the stream into a buffer in cases where the number of bytes is known and fixed, for example when reading in structures. ReadBuffer is used internally for loading from a stream and copying from a stream.

ReadBuffer calls Read to do the actual reading. If Count bytes cannot be read from the stream, an EReadError exception is raised.

See Also

Code Examples