Skip to content

TOwnerStream

Stream which uses a second stream as a source.

Declaration

Source position: classesh.inc line 1562

type

  TOwnerStream = class(TStream)
  public
    constructor Create;
    destructor Destroy;
    property Source: TStream; {r}
    property SourceOwner: Boolean; {rw}
  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).

Properties

Member Visibility Description
Source read only public Reference to the source stream.
SourceOwner public Indicates whether the ownerstream owns it's source.
See all Properties

Methods

Member Visibility Description
Create public Create a new instance of TOwnerStream.
Destroy public Destroys the TOwnerStream instance and the source stream.
See all Methods

See also

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