This is a new site that's currently running on alpha code. There are going to be bugs. If you discover any, please report them on the site's issues page (GitHub account required). Thanks.
Warning: Many URLs are going to change. Refer to the README file to discover which library project's documentation has been completed.
Project: Stream Extension Classes
Applies to: ~>3.0
This class can wrap any TStream derived class and provide access to it by means of an IStream interface.
This class is similar to Delphi’s TStreamAdapter class, except in the way it handles the Stat method. Sub-classes of TPJIStreamWrapper can override Stat to provide more meaningful information.
Not all features of IStream are supported in this implementation. Those that are not supported are noted in this documentation.
Study the source code of the IStreamWrapDemo demo program to see this class, and those derived from it, in use.
|Clone||Method of IStream. Creates a new IStream object that accesses the same physical stream. Not supported in this implementation.|
|Commit||Method of IStream. Commits pending changes.|
|CopyTo||Method of IStream. Copies data from the wrapped stream into another stream.|
|Create||Object constructor. Creates a new wrapper object for a given stream.|
|LockRegion||Method of IStream. Restricts access to a specified range of bytes in the stream. Not supported in this implementation.|
|Read||Method of IStream. Reads data from the wrapped stream.|
|Revert||Method of IStream. Discards un-committed changes in a transacted stream.|
|Seek||Method of IStream. Changes the seek pointer to a new location.|
|SetSize||Method of IStream. Changes the size of the stream.|
|Stat||Method of IStream. Retrieves the TStatStg structure that provides information about the wrapped stream.|
|UnlockRegion||Method of IStream. Removes access restrictions from a range of bytes in the stream. Not supported in this implementation.|
|Write||Method of IStream. Writes data to the wrapped stream.|
[~>3.0.0] Note that the methods of IStream have protected visibility in TPJIStreamWrapper and cannot be accessed from an object instance referenced by a variable of type TPJIStreamWrapper. The methods can only be accessed via the object’s IStream interface.
[~>3.1] Methods of IStream have public visibility.
TPJIStreamWrapper exposes no properties.
TPJIStreamWrapper exposes no events.