| Class TStreamAdapter (unit SuperStream) |
TStream
TStreamAdapter defines a stream that wraps another stream.
| Constructors |
constructor Create(targetStream : TStream; owned : Boolean);| Functions |
destructor Destroy;
function Read(var Buffer; Count: Longint): Longint;
function Seek(Offset: Longint; Origin: Word): Longint;
function Write(const Buffer; Count: Longint): Longint;| Properties |
| Events |
| Variables |
| Constructors |
constructor Create(targetStream : TStream; owned : Boolean);| Parameter | Description |
|---|---|
| targetStream | The stream being adapted. |
| owned | If true, the stream being adapted will be destroyed when the adapter is destroyed. |
Construct a stream adapter.
| Functions |
destructor Destroy;Destroy a stream adapter. Will also destroy the target stream if the owned flag is set true.
function Read(var Buffer; Count: Longint): Longint;| Parameter | Description |
|---|---|
| buffer | Variable to read bytes into. |
| count | Number of bytes to read. |
Read count bytes into buffer. This is an override of the standard stream function.
function Seek(Offset: Longint; Origin: Word): Longint;| Parameter | Description |
|---|---|
| offset | The position to move to. |
| origin | Where to move: Can be soFromBeginning, soFromCurrent, or soFromEnd. |
Move to a given position in the stream.
function Write(const Buffer; Count: Longint): Longint;| Parameter | Description |
|---|---|
| buffer | Variable to write to the stream. |
| count | Number of bytes to write. |
write count bytes to the stream. This is an override of the standard stream function.
| Properties |
| Events |
| Variables |