This class library contains two units that provide some classes that can be used to extend the functionality of Delphi's TStream classes.
The PJStreamWrapper unit provides a class that can wrap any TStream descendant while the PJIStreams unit provides classes that implement the IStream interface for various TStream descendants.
The classes are all documented online.
Three demo projects are provided in the download:
IStreamWrap.dpr
in theIStreamWrapDemo
sub-directory. This is a VCL project that demonstrates the IStream wrapper classes in the PJIStreams unit.IStreamWrapFMX.dpr
in theIStreamWrapDemoFMX
sub-directory. This is a FireMonkey 2 project that demonstrates the IStream wrapper classes in the PJIStreams unit. It is similar, but not identical, toIStreamWrap.dpr
.StreamWrap.dpr
in theStreamWrapDemo
sub-directory. This is a VCL project that demonstrates the PJStreamWrapper unit.
All the demo projects are stored in the Demos
directory.
Unit tests are provided for all classes in the Tests
directory.
Tests require the DUnit unit testing framework, which must be installed in a location accessible to your Delphi compiler.
The classes are compatible with the following:
- The Delphi 4 and later Win 32 compilers.
- The Delphi XE2 and later Win 64 compilers.
- Both ANSI and Unicode strings.
- The VCL and FireMonkey platforms (for Windows only).
The Stream Extension Classes units are provided in a zip file. Once the units are extracted you can use them as required. There are several ways you may wish to do this:
- The simplest way is to add the units to your projects as you need them.
- To make the units easier to re-use you can add the folder where you extracted them to your Delphi search path and then simply use the units as required without needing to add them to your project.
- For maximum portability you can add the units to a package. More info....
- If you use Git you can add the
ddablib/streams
GitHub repository as a Git submodule and add it to your project. Obviously, it's safer if you fork the repo and use your copy, just in caseddablib/streams
ever goes away.
In addition to the above files, there are two directories included in the zip file:
- The
Demos
directory contains the demo projects. - The
Tests
directory contains the unit tests.
A complete change log is provided in CHANGELOG.md
that is included in the download.
The Stream Extension Classes are released under the terms of the Mozilla Public License, v2.0.
Bugs can be reported or new features requested via the project's Issue Tracker. A GitHub account is required.
Please check if an issue has already been created for a similar report or request. If so then please add a comment containing as much information as you can to the existing issue, or if you've nothing to add, just add a 👍 (:+1:
) comment. If there is no suitable existing issue then please add a new issue and give as much information as possible.
I'm Peter Johnson – a hobbyist programmer living in Ceredigion in West Wales, UK, writing mainly in Delphi. My programs and other library code are available from: https://delphidabbler.com/.
This document is copyright © 2000-2022, P D Johnson.