Unit 'Classes' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#rtl]

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 1443

type TOwnerStream = class(TStream)

public

  constructor Create();

  

Create a new instance of TOwnerStream.

  destructor Destroy; override;

  

Destroys the TOwnerStream instance and the source stream.

  property Source: TStream; [r]

  

Reference to the source stream.

  property SourceOwner: Boolean; [rw]

  

Indicates whether the ownerstream owns it's source.

end;

Inheritance

TOwnerStream

  

Stream which uses a second stream as a source.

|

TStream

  

Base class for streams.

|

TObject

  

Base class of all classes.

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).

See also

TStream

  

Base class for streams.

TOwnerStream.Source

  

Reference to the source stream.

TOwnerStream.SourceOwner

  

Indicates whether the ownerstream owns it's source.


Documentation generated on: Nov 22 2024