Parser.initWithStream

Initializes parser to use stream.

WARNING: Initializing a parser with a stream is comparable to selling your soul (stream) to the devil (parser). You are basically giving the parser complete control of the stream, this means that you had better not touch the stream so long as the parser is still using it. This means no reading, writing, seeking, or resetting of the stream. Anything that will/could change the current stream's offset is PROHIBITED.

It is also recommended that you not use gmime.stream.Stream.tell because it will not necessarily give you the current parser offset since parser handles its own internal read-ahead buffer. Instead, it is recommended that you use gmime.parser.Parser.tell if you have a reason to need the current offset of the parser.

class Parser
void
initWithStream

Parameters

stream gmime.stream.Stream

raw message or part stream