Aspose::Email::Storage::Mbox::MboxStorageReader Class Referenceabstract

A base class for any mbox-based mail storage reader. More...

Inherits IDisposable.

Inherited by Aspose::Email::Storage::Mbox::FINAL.

Public Member Functions

ASPOSE_EMAIL_SHARED_API System::SharedPtr< System::IO::Stream > get_BaseStream () const
 Gets the base stream. More...
 
ASPOSE_EMAIL_SHARED_API int64_t get_CurrentDataSize () const
 Gets the number of bytes that is read by ReadNextMessage method. More...
 
virtual ASPOSE_EMAIL_SHARED_API System::SharedPtr< MailMessageReadNextMessage ()=0
 Reads the next message from underlying storage stream. More...
 
virtual ASPOSE_EMAIL_SHARED_API System::SharedPtr< MailMessageReadNextMessage (System::String &fromMarker)=0
 Reads the next message from underlying storage stream. More...
 
ASPOSE_EMAIL_SHARED_API void Dispose ()
 Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. More...
 

Protected Member Functions

ASPOSE_EMAIL_SHARED_API void set_CurrentDataSize (int64_t value)
 Gets the number of bytes that is read by ReadNextMessage method. More...
 
ASPOSE_EMAIL_SHARED_API MboxStorageReader (System::SharedPtr< System::IO::Stream > stream, bool leaveOpen)
 Initializes a new instance of the MboxStorageReader class. More...
 
ASPOSE_EMAIL_SHARED_API MboxStorageReader (System::String fileName, bool leaveOpen)
 Initializes a new instance of the MboxStorageReader class. More...
 
virtual ASPOSE_EMAIL_SHARED_API void Dispose (bool disposing)
 Releases unmanaged and - optionally - managed resources More...
 

Friends

class Aspose::Email::Storage::Mbox::MboxrdStorageReader
 

Detailed Description

A base class for any mbox-based mail storage reader.

Constructor & Destructor Documentation

◆ MboxStorageReader() [1/2]

ASPOSE_EMAIL_SHARED_API Aspose::Email::Storage::Mbox::MboxStorageReader::MboxStorageReader ( System::SharedPtr< System::IO::Stream >  stream,
bool  leaveOpen 
)
protected

Initializes a new instance of the MboxStorageReader class.

Parameters
streamThe stream.
leaveOpenif set to true leaves the underlying stream open after disposing.
Exceptions
ArgumentNullExceptionIf given stream is null.

◆ MboxStorageReader() [2/2]

ASPOSE_EMAIL_SHARED_API Aspose::Email::Storage::Mbox::MboxStorageReader::MboxStorageReader ( System::String  fileName,
bool  leaveOpen 
)
protected

Initializes a new instance of the MboxStorageReader class.

Parameters
fileNameName of the file.
leaveOpenif set to true leaves the underlying stream open after disposing.
Exceptions
ArgumentNullExceptionIf filename is null or empty.

Member Function Documentation

◆ Dispose() [1/2]

ASPOSE_EMAIL_SHARED_API void Aspose::Email::Storage::Mbox::MboxStorageReader::Dispose ( )

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

◆ Dispose() [2/2]

virtual ASPOSE_EMAIL_SHARED_API void Aspose::Email::Storage::Mbox::MboxStorageReader::Dispose ( bool  disposing)
protectedvirtual

Releases unmanaged and - optionally - managed resources

Parameters
disposingtrue to release both managed and unmanaged resources; false to release only unmanaged resources.

◆ get_BaseStream()

ASPOSE_EMAIL_SHARED_API System::SharedPtr<System::IO::Stream> Aspose::Email::Storage::Mbox::MboxStorageReader::get_BaseStream ( ) const

Gets the base stream.

The base stream.

◆ get_CurrentDataSize()

ASPOSE_EMAIL_SHARED_API int64_t Aspose::Email::Storage::Mbox::MboxStorageReader::get_CurrentDataSize ( ) const

Gets the number of bytes that is read by ReadNextMessage method.

◆ ReadNextMessage() [1/2]

virtual ASPOSE_EMAIL_SHARED_API System::SharedPtr<MailMessage> Aspose::Email::Storage::Mbox::MboxStorageReader::ReadNextMessage ( )
pure virtual

Reads the next message from underlying storage stream.

Returns
A MailMessage object if it can be read or null if no more messages are available.

◆ ReadNextMessage() [2/2]

virtual ASPOSE_EMAIL_SHARED_API System::SharedPtr<MailMessage> Aspose::Email::Storage::Mbox::MboxStorageReader::ReadNextMessage ( System::String &  fromMarker)
pure virtual

Reads the next message from underlying storage stream.

Parameters
fromMarkerGets the From Marker while parsing the MBox Storage file.
Returns
A MailMessage object if it can be read or null if no more messages are available.

◆ set_CurrentDataSize()

ASPOSE_EMAIL_SHARED_API void Aspose::Email::Storage::Mbox::MboxStorageReader::set_CurrentDataSize ( int64_t  value)
protected

Gets the number of bytes that is read by ReadNextMessage method.

Friends And Related Function Documentation

◆ Aspose::Email::Storage::Mbox::MboxrdStorageReader

friend class Aspose::Email::Storage::Mbox::MboxrdStorageReader
friend