init_with_stream


Description:

public void init_with_stream (Stream stream)

Initializes this to use stream.

WARNING: Initializing a parser with a stream is comparable to selling your soul (stream) to the devil ( this). 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 tell because it will not necessarily give you the current this offset since this handles its own internal read-ahead buffer. Instead, it is recommended that you use tell if you have a reason to need the current offset of the this.

Parameters:

this

a Parser context

stream

raw message or part stream