# The Stream Class

The Stream class defines objects which accepts a sequence of characters. Streams may also have an output in which case multiple stream objects can be cascaded to build a stream pipe where the output of a stream is directed into the input of the next stream object "down the line". Of course, one of the main features of streams is that they can perform a data conversion on the data before piping it to the output. As multiple streams may be cascaded, the complete data conversion is then the sum of each individual data conversion performed by the stream objects being part of the stream pipe.

It is not required that a stream has a target, it might as well be a black hole that just accepts data without ever giving it out again. The generic stream class is subclassed multiple places in the Library and a good example is the structured stream definition which creates a SGML object.

All stream class methods return an integer status code telling whether the operation succeeded or not.. This is the way for a stream to pass control information upstream to the caller which may also be a stream.

Adding and Deleting Format Converters