Classe TRESTDWBuffer

Unit

Declaração

type TRESTDWBuffer = class(TObject)

Descrição

Hierarquia

Visão Geral

Campos

Protected FBytes: TRESTDWBytes;
Protected FSize: Integer;
Protected FGrowthFactor: Integer;
Protected FHeadIndex: Integer;
Protected FOnBytesRemoved: TRESTDWBufferBytesRemoved;

Métodos

Protected Procedure CheckAdd(AByteCount : Integer; Const AIndex : Integer);
Protected Procedure CheckByteCount(Var VByteCount : Integer; Const AIndex : Integer);
Protected Function GetCapacity: Integer;
Protected Procedure SetCapacity(AValue : Integer);
Public Procedure Clear;
Public Constructor Create; Overload;
Public Constructor Create(AOnBytesRemoved : TRESTDWBufferBytesRemoved); Overload;
Public Constructor Create(AGrowthFactor : Integer); Overload;
Public Constructor Create(Const ABytes : TRESTDWBytes; Const ALength : Integer = -1); Overload;
Public Procedure CompactHead(ACanShrink : Boolean = True);
Public Destructor Destroy; override;
Public Function Extract(AByteCount : Integer = -1) : String;
Public Function ExtractToString(AByteCount : Integer = -1) : String;
Public Procedure ExtractToStream(Const AStream : TStream; AByteCount : Integer = -1; Const AIndex : Integer = -1);
Public Procedure ExtractToBuffer(ABuffer : TRESTDWBuffer; AByteCount : Integer = -1; Const AIndex : Integer = -1);
Public Procedure ExtractToBytes(Var VBytes : TRESTDWBytes; AByteCount : Integer = -1; AAppend : Boolean = True; AIndex : Integer = -1);
Public Function IndexOf(Const AByte : Byte; AStartPos : Integer = 0) : Integer; Overload;
Public Function IndexOf(Const ABytes : TRESTDWBytes; AStartPos : Integer = 0) : Integer; Overload;
Public Function IndexOf(Const AString : String; AStartPos : Integer = 0) : Integer; Overload;
Public Function PeekByte(AIndex : Integer) : Byte;
Public Procedure Remove(AByteCount : Integer);
Public Procedure SaveToStream(Const AStream : TStream);
Public Procedure Write(Const AString : String; Const ADestIndex : Integer = -1); Overload;
Public Procedure Write(Const ABytes : TRESTDWBytes; Const ADestIndex : Integer = -1); Overload;
Public Procedure Write(Const ABytes : TRESTDWBytes; Const ALength, AOffset : Integer; Const ADestIndex : Integer = -1); Overload;
Public Procedure Write(AStream : TStream; AByteCount : Integer = 0); Overload;

Propriedades

Public property Capacity : Integer Read GetCapacity Write SetCapacity;
Public property GrowthFactor : Integer Read FGrowthFactor Write FGrowthFactor;
Public property Size : Integer Read FSize;
Public property AsString : String Read GetAsString;

Descrição

Campos

Protected FBytes: TRESTDWBytes;
 
Protected FSize: Integer;
 
Protected FGrowthFactor: Integer;
 
Protected FHeadIndex: Integer;
 
Protected FOnBytesRemoved: TRESTDWBufferBytesRemoved;
 

Métodos

Protected Procedure CheckAdd(AByteCount : Integer; Const AIndex : Integer);
 
Protected Procedure CheckByteCount(Var VByteCount : Integer; Const AIndex : Integer);
 
Protected Function GetCapacity: Integer;
 
Protected Procedure SetCapacity(AValue : Integer);
 
Public Procedure Clear;
 
Public Constructor Create; Overload;
 
Public Constructor Create(AOnBytesRemoved : TRESTDWBufferBytesRemoved); Overload;
 
Public Constructor Create(AGrowthFactor : Integer); Overload;
 
Public Constructor Create(Const ABytes : TRESTDWBytes; Const ALength : Integer = -1); Overload;
 
Public Procedure CompactHead(ACanShrink : Boolean = True);
 
Public Destructor Destroy; override;
 
Public Function Extract(AByteCount : Integer = -1) : String;
 
Public Function ExtractToString(AByteCount : Integer = -1) : String;
 
Public Procedure ExtractToStream(Const AStream : TStream; AByteCount : Integer = -1; Const AIndex : Integer = -1);
 
Public Procedure ExtractToBuffer(ABuffer : TRESTDWBuffer; AByteCount : Integer = -1; Const AIndex : Integer = -1);
 
Public Procedure ExtractToBytes(Var VBytes : TRESTDWBytes; AByteCount : Integer = -1; AAppend : Boolean = True; AIndex : Integer = -1);
 
Public Function IndexOf(Const AByte : Byte; AStartPos : Integer = 0) : Integer; Overload;
 
Public Function IndexOf(Const ABytes : TRESTDWBytes; AStartPos : Integer = 0) : Integer; Overload;
 
Public Function IndexOf(Const AString : String; AStartPos : Integer = 0) : Integer; Overload;
 
Public Function PeekByte(AIndex : Integer) : Byte;
 
Public Procedure Remove(AByteCount : Integer);
 
Public Procedure SaveToStream(Const AStream : TStream);
 
Public Procedure Write(Const AString : String; Const ADestIndex : Integer = -1); Overload;
 
Public Procedure Write(Const ABytes : TRESTDWBytes; Const ADestIndex : Integer = -1); Overload;
 
Public Procedure Write(Const ABytes : TRESTDWBytes; Const ALength, AOffset : Integer; Const ADestIndex : Integer = -1); Overload;
 
Public Procedure Write(AStream : TStream; AByteCount : Integer = 0); Overload;
 

Propriedades

Public property Capacity : Integer Read GetCapacity Write SetCapacity;
 
Public property GrowthFactor : Integer Read FGrowthFactor Write FGrowthFactor;
 
Public property Size : Integer Read FSize;
 
Public property AsString : String Read GetAsString;
 

Gerado por PasDoc 0.16.0.