[Overview][Constants][Classes][Index] |
[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Provide a window on another stream
Source position: streamex.pp line 164
type TWindowedStream = class(TOwnerStream) |
||
public |
||
constructor Create(); |
|
Initialize a new instance of TWindowedStream |
destructor Destroy; override; |
|
Destroy the TWindowedStream instance. |
function Read(); override; |
|
Read data from the stream |
function Write(); override; |
|
Read data to the stream |
function Seek(); override; |
|
Reposition the stream |
end; |
|
Provide a window on another stream |
|
| | ||
| | ||
| | ||
TWindowedStream is a TStream descendent that can be used to provide a window on the data of another stream. The position and size of the window can be determined in the constructor, and the stream will behave as a normal stream. The actual reading (or writing) will happen on the source stream.
If the source stream has some limitations (e.g. no Seek) then the TWindowedStream will inherit these limitations.
The TWindowedStream will keep track of the last position it used, and will attempt to restore it if it was modified between calls to Read and Write.
|
Initialize a new instance of TWindowedStream |