Class TAdBufferStreamAdapter

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TAdBufferStreamAdapter = class(TStream)

Description

TAdBufferedFileStram is a class that provides high speed read access on streams, by buffering parts of the stream. Instead of using this class directly, you may also use the QueryBufferedStream and the FreeBufferedStream classes.

Hierarchy

Overview

Methods

Public constructor Create(AStream: TStream);
Public destructor Destroy; override;
Public function Read(var Buffer; Count: Longint): Longint; override;
Public function Write(const Buffer; Count: Longint): Longint; override;
Public function Seek(const Offset: Int64; Origin: TSeekOrigin): Int64; override;

Properties

Public property InstanceCount: integer read FInstanceCount write FInstanceCount;
Public property AdaptedStream: TStream read FStream;

Description

Methods

Public constructor Create(AStream: TStream);

Creates a new instance of TAdBufferStreamAdapter.

Parameters
AStream
specifies the stream that should be buffered.
Public destructor Destroy; override;

Destroys the instance of TAdBufferStreamAdapter.

Public function Read(var Buffer; Count: Longint): Longint; override;

Reads "Count" bytes to the specified buffer and returns the count of bytes that were actually read.

Public function Write(const Buffer; Count: Longint): Longint; override;

Writes "Count" bytes from the specified buffer and returns the count of bytes that were actually written.

Public function Seek(const Offset: Int64; Origin: TSeekOrigin): Int64; override;

Seeks to the specified position in the stream.

Properties

Public property InstanceCount: integer read FInstanceCount write FInstanceCount;

Property that is used by the QueryBufferedStream and FreeBufferedStream functions. InstanceCount gets incremented with every call of QueryBufferedStream and decremented with every call of FreeBufferedStream. If InstanceCount reaches zero, the instance of TAdBufferStreamAdapter is freed.

Public property AdaptedStream: TStream read FStream;

The source stream the TAdBufferStreamAdapter uses.

SourceForge.net Logo


Generated by PasDoc 0.11.0 on 2008-12-31 14:31:58