Parser.setPersistStream

Sets whether or not the parser's underlying stream is persistent.

If persist is true, the parser will attempt to construct messages/parts whose content will remain on disk rather than being loaded into memory so as to reduce memory usage. This is the default.

If persist is false, the parser will always load message content into memory.

Note: This attribute only serves as a hint to the parser. If the underlying stream does not support seeking, then this attribute will be ignored.

By default, this feature is enabled if the underlying stream is seekable.

class Parser
void
setPersistStream
(
bool persist
)

Parameters

persist bool

persist attribute