[haiku-development] A true streaming equivalent of BDataIO

Howdy all,

The support kit provides the BDataIO class, extended with seeking in the
BPositionIO class, which serves its purpose for simple IO.

However many plug-ins insist on seekable content by accepting only a
BPositionIO. The closest solution to the streaming data construct is the
BBufferIO, which allows the buffering of data, but AFAIK it's missing the
crucial freeing part: freeing already read data, and avoiding using too much
memory in the process.

I tried writing my own subclass, where the readat function would return an
equivalent number of blocks from the disk, but I think the producer should
really be independent from the consumer in this kind of data interface.

Now, I think that a class inheriting BPositionIO that directly implements
the standard iostream class, with the general read and write function, but
with little or no actual seeking capacity, should do the job. However I
could be wrong...

--
Cheers,
Christopher

Other related posts: