Class TBufferedReadStream

Unit

Declaration

type TBufferedReadStream = class(TPeekCharStream)

Description

Read another stream, sequentially, always being able to back one character, and buffering it. This implements abstract TPeekCharStream class, so this is a purely sequential read-only stream that reads from underlying SourceStream and you can use PeekChar and ReadChar and ReadUpto routines.

This stream will buffer incoming data from SourceStream. This means that reading by a very small chunks (like e.g. byte-by-byte) does not hurt performance.

Hierarchy

Overview

Methods

Protected function GetPosition: Int64; override;
Public constructor Create(ASourceStream: TStream; AOwnsSourceStream: boolean; ABufferSize: LongWord = DefaultReadBufferSize);
Public destructor Destroy; override;
Public function Read(var LocalBuffer; Count: Longint): Longint; override;
Public function PeekChar: Integer; override;
Public function ReadChar: Integer; override;
Public function ReadUpto(const EndingChars: TSetOfChars): AnsiString; override;

Properties

Public property BufferSize: LongWord read FBufferSize;

Description

Methods

Protected function GetPosition: Int64; override;
 
Public constructor Create(ASourceStream: TStream; AOwnsSourceStream: boolean; ABufferSize: LongWord = DefaultReadBufferSize);
 
Public destructor Destroy; override;
 
Public function Read(var LocalBuffer; Count: Longint): Longint; override;
 
Public function PeekChar: Integer; override;
 
Public function ReadChar: Integer; override;
 
Public function ReadUpto(const EndingChars: TSetOfChars): AnsiString; override;
 

Properties

Public property BufferSize: LongWord read FBufferSize;
 

Generated by PasDoc 0.16.0.