Imap |
protected virtual Stream CreateStream( UniqueId? uid, string section, int offset, int length )
Allows subclass implementations to override the type of stream created for use with the GetMessage, GetBodyPart and GetStream methods.
This could be useful for subclass implementations that intend to implement support for caching and/or for subclass implementations that want to use temporary file streams instead of memory-based streams for larger amounts of message data.
Subclasses that implement caching using this API should wait for CommitStream(Stream, UniqueId, String, Int32, Int32) before adding the stream to their cache.
Streams returned by this method SHOULD clean up any allocated resources such as deleting temporary files from the file system.
Note |
---|
The uid will not be available for the various GetMessage(), GetBodyPart() and GetStream() methods that take a message index rather than a UniqueId. It may also not be available if the IMAP server response does not specify the UID value prior to sending the literal-string token containing the message stream. |