Topic Path: Pending > TIdStream.ReadBytes@TIdBytes@Integer@Integer@Boolean
ContentsIndexHome
PreviousUpNext
TIdStream.ReadBytes@TIdBytes@Integer@Integer@Boolean

Specifies the method for reading byte values into a buffer.

Parameters 
Description 
ABytes 
Buffer for values read from the stream.
 
ACount 
Number of bytes to read from the stream.
 
AOffset 
Initial position in the Buffer used to store values from the stream. Default is 0.
 
AExceptionOnCountDiffer 
Indicates an exception is raised when ACount differs from the actual number of bytes read from the stream. Default is True. 

Integer - Actual number of bytes read from the stream.

ReadBytes is an abstract virtual Integer function that specifies the method used to read values from the stream into the buffer specified in ABytes. 

ACount indicates the number of bytes to be read from the stream. 

AOffset indicates the initial in ABytes used to store values read from the stream. AOffset starts at 0. 

AExceptionOnCountDiffer indicates if an EIdException exception is raised when the actual number of bytes read from the stream is different than the value in ACount. 

ReadBytes is an abstract virtual method, and must me implemented in a descendant class that provides access to the stream implementation for a specific platform or Operating System. 

ReadBytes also isolates the differences between accessing a Delphi string and a .Net Array of Byte using subscripted values.

TIdStreamVCL 

TIdStreamVCLDotNet 

TIdStreamVCLWin32

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.