Class TBufferedStream

Unit

Declaration

type TBufferedStream = class(TStream)

Description

Hierarchy

Overview

Methods

Protected procedure SetIsReadOnly(const Value: Boolean);
Protected procedure SetSize(NewSize: Integer); override;
Protected procedure SetSize(const NewSize: Int64); override;
Protected function InternalGetSize: Int64; inline;
Protected function GetSize: Int64; override;
Protected procedure Init; virtual;
Protected function FillBuffer: Boolean; inline;
Public constructor Create; overload;
Public constructor Create(Stream : TStream; BufferSize : Integer = DEFAULT_BUFSIZE; OwnsStream : Boolean = FALSE); overload; virtual;
Public constructor Create(const FileName : String; Mode : Word; BufferSize : Integer = DEFAULT_BUFSIZE); overload; virtual;
Public destructor Destroy; override;
Public procedure Flush; inline;
Public function Read(var Buffer; Count: Integer): Integer; override;
Public function Seek(Offset: Integer; Origin: Word): Integer; override;
Public function Seek(const Offset: Int64; Origin: TSeekOrigin): Int64; override;
Public function Write(const Buffer; Count: Integer): Integer; override;

Properties

Public property IsReadOnly: Boolean read FIsReadOnly write SetIsReadOnly;
Public property FastSize: Int64 read GetSize;

Description

Methods

Protected procedure SetIsReadOnly(const Value: Boolean);

See property IsReadOnly below

Protected procedure SetSize(NewSize: Integer); override;
 
Protected procedure SetSize(const NewSize: Int64); override;
 
Protected function InternalGetSize: Int64; inline;
 
Protected function GetSize: Int64; override;
 
Protected procedure Init; virtual;
 
Protected function FillBuffer: Boolean; inline;
 
Public constructor Create; overload;
 
Public constructor Create(Stream : TStream; BufferSize : Integer = DEFAULT_BUFSIZE; OwnsStream : Boolean = FALSE); overload; virtual;

Dummy, don't call!

Public constructor Create(const FileName : String; Mode : Word; BufferSize : Integer = DEFAULT_BUFSIZE); overload; virtual;
 
Public destructor Destroy; override;
 
Public procedure Flush; inline;
 
Public function Read(var Buffer; Count: Integer): Integer; override;
 
Public function Seek(Offset: Integer; Origin: Word): Integer; override;
 
Public function Seek(const Offset: Int64; Origin: TSeekOrigin): Int64; override;
 
Public function Write(const Buffer; Count: Integer): Integer; override;
 

Properties

Public property IsReadOnly: Boolean read FIsReadOnly write SetIsReadOnly;

Set IsReadOnly if you are sure you will never write to the stream and nobody else will do, this speeds up getter Size and in turn Seeks as well. IsReadOnly is set to TRUE if a constructor with filename is called with a read only mode and a share lock.

Public property FastSize: Int64 read GetSize;
 

Generated by PasDoc 0.16.0.