Class ParagraphStream
Stream filter which merges text lines into paragraphs. The boundary of paragraph is defined by an empty text line. If the last paragraph in the stream is not terminated by an empty line the left over is assumed to be a paragraph.
public class ParagraphStream : FilterObjectStream<string?, string?>, IObjectStream<string?>, IDisposable
- Inheritance
-
ParagraphStream
- Implements
- Inherited Members
Constructors
ParagraphStream(IObjectStream<string?>)
Stream filter which merges text lines into paragraphs. The boundary of paragraph is defined by an empty text line. If the last paragraph in the stream is not terminated by an empty line the left over is assumed to be a paragraph.
public ParagraphStream(IObjectStream<string?> lineStream)
Parameters
lineStreamIObjectStream<string>
Methods
Read()
Returns the next object. Calling this method repeatedly until it returns
null will return each object from the underlying source exactly once.
public override string? Read()
Returns
- string
the next object or
nullto signal that the stream is exhausted
Exceptions
- IOException
if there is an error during reading