Skip to content
This repository has been archived by the owner on Jan 16, 2019. It is now read-only.

Memory stream

Frank Kleine edited this page Aug 3, 2014 · 4 revisions

Memory streams

Sometimes it is helpful if one can read or write data into memory. For such purposes the stubbles\streams\memory\MemoryInputStream and stubbles\streams\memory\MemoryOutputStream exist. While the memory input stream class expects the content to be read from as string parameter for its constructor, the memory output stream does not expect a value on construction, but offers an additional method buffer() which returns all data written to this stream so far. Additionally, casting the stubbles\streams\memory\MemoryOutputStream to string will return the buffer (available since release 4.0.0).

The memory input stream is a seekable stream.

Clone this wiki locally