TOwnerStream

[Properties (by Name)][Methods (by Name)][Events (by Name)]

Stream which uses a second stream as a source

Declaration

Source position: classesh.inc line 1146

Type
  TOwnerStream = class (TStream)
  protected
    FOwner : Boolean;
    FSource : TStream;
  public
    constructor Create(ASource: TStream);
    destructor Destroy;  Override;
    Source : TStream;
    SourceOwner : Boolean;
  end
  ;

Description

TOwnerStream can be used when creating stream chains such as when using encryption and compression streams. It keeps a reference to the source stream and will automatically free the source stream when ready (if the SourceOwner property is set to True).

Members

Member Type Visibility Description
Create Method public Create a new instance of TOwnerStream.
Destroy Method public Destroys the TOwnerStream instance and the source stream.
FOwner Field protected
FSource Field protected
Source Property public Reference to the source stream.
SourceOwner Property public Indicates whether the ownerstream owns it's source

Inheritance

Class Description
TOwnerStream Stream which uses a second stream as a source

See also

Name Description
TOwnerStream.Source Reference to the source stream.
TOwnerStream.SourceOwner Indicates whether the ownerstream owns it's source
TStream Base class for streams.
TStream Base class for streams.
TStream Base class for streams.