A base class for any mbox-based mail storage reader. More...
Inherits IDisposable.
Inherited by Aspose::Email::Storage::Mbox::MboxoStorageReader, and Aspose::Email::Storage::Mbox::MboxrdStorageReader.
Public Member Functions | |
System::SharedPtr< System::IO::Stream > | get_BaseStream () const |
Gets the base stream. More... | |
int64_t | get_CurrentDataSize () const |
Gets the number of bytes that is read by ReadNextMessage method. More... | |
System::SharedPtr< System::Collections::Generic::IEnumerable< System::SharedPtr< MailMessage > > > | EnumerateMessages () |
Exposes the enumerator, which supports an iteration of messages in storage. More... | |
System::SharedPtr< System::Collections::Generic::IEnumerable< System::SharedPtr< MboxMessageInfo > > > | EnumerateMessageInfo () |
Exposes the enumerator, which supports an iteration of messages in storage. More... | |
System::SharedPtr< MailMessage > | ExtractMessage (System::String id, System::SharedPtr< EmlLoadOptions > options) |
Get the message from MBOX. More... | |
System::SharedPtr< System::Collections::Generic::IEnumerable< System::SharedPtr< MailMessage > > > | EnumerateMessages (System::SharedPtr< EmlLoadOptions > options) |
Exposes the enumerator, which supports an iteration of messages in storage. More... | |
void | SplitInto (int64_t chunkSize, System::String outputPath) |
Splits the mbox storage into less sized parts. More... | |
void | SplitInto (int64_t chunkSize, System::String outputPath, System::String partFileNamePrefix) |
Splits the mbox storage into less sized parts. More... | |
virtual System::SharedPtr< MailMessage > | ReadNextMessage ()=0 |
Reads the next message from underlying storage stream. More... | |
virtual System::SharedPtr< MailMessage > | ReadNextMessage (System::String &fromMarker)=0 |
Reads the next message from underlying storage stream. More... | |
virtual System::SharedPtr< MailMessage > | ReadNextMessage (System::SharedPtr< EmlLoadOptions > options)=0 |
Reads the next message from underlying storage stream. More... | |
virtual System::SharedPtr< MailMessage > | ReadNextMessage (System::String &fromMarker, System::SharedPtr< EmlLoadOptions > options)=0 |
Reads the next message from underlying storage stream. More... | |
virtual System::SharedPtr< MboxMessageInfo > | NextMessage ()=0 |
Gets the next message info. More... | |
virtual int32_t | GetTotalItemsCount ()=0 |
Returns the number of messages in a storage. More... | |
void | Dispose () override |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. More... | |
VentureLicenseState | GetVentureLicenseState () |
Static Public Member Functions | |
static System::SharedPtr< MboxStorageReader > | CreateReader (System::SharedPtr< System::IO::Stream > stream, System::SharedPtr< MboxLoadOptions > options) |
Creates the instance of reader. More... | |
static System::SharedPtr< MboxStorageReader > | CreateReader (System::String fileName, System::SharedPtr< MboxLoadOptions > options) |
Creates the instance of reader. More... | |
static bool | ByteArrayStartsFromMarker (System::ArrayPtr< uint8_t > array, System::ArrayPtr< uint8_t > marker) |
Checks whether the array starts from given marker. More... | |
static bool | ContainsAsctime (System::ArrayPtr< uint8_t > currentLine) |
Determines whether the specified line contains asctime string. More... | |
static System::ArrayPtr< uint8_t > | ReadLine (System::SharedPtr< System::IO::Stream > stream) |
Reads the line from stream. More... | |
Public Attributes | |
int32_t | msgCount |
System::SharedPtr< System::Object > | mVentureLicense |
System::Event< void(System::SharedPtr< System::Object >, System::SharedPtr< MimeItemCopyEventArgs >)> | EmlCopying |
Event that occurs before the MailMessage object copy process, within the SplitInto(long, string) method. More... | |
System::Event< void(System::SharedPtr< System::Object >, System::SharedPtr< MimeItemCopyEventArgs >)> | EmlCopied |
Event that occurs after successful copy of a MailMessage object within the SplitInto(long, string) method. More... | |
System::Event< void(System::SharedPtr< System::Object >, System::SharedPtr< NewStorageEventArgs >)> | MboxFileCreated |
Event that occurs when a new MBOX file is created during the SplitInto(long, string) method. More... | |
System::Event< void(System::SharedPtr< System::Object >, System::SharedPtr< NewStorageEventArgs >)> | MboxFileFilled |
Event that occurs after filling an MBOX file with data within the SplitInto(long, string) method. More... | |
Static Public Attributes | |
static System::ArrayPtr< uint8_t > | FromMarker |
"From " signature, indicates a start of the message. More... | |
static System::ArrayPtr< uint8_t > | EmptyFromMarkerCRLF |
static System::ArrayPtr< uint8_t > | EmptyFromMarkerCR |
static System::ArrayPtr< uint8_t > | EmptyFromMarkerLF |
static System::ArrayPtr< uint8_t > | MboxoMarker |
The mbox format uses a single blank line followed by the string 'From ' (with a space) to delimit messages. In mboxo format sender's email address in message delimiter is replaced by the constant string '???@???', i.e. 'From ???@???' More... | |
Protected Member Functions | |
void | set_CurrentDataSize (int64_t value) |
Gets the number of bytes that is read by ReadNextMessage method. More... | |
MboxStorageReader (System::SharedPtr< System::IO::Stream > stream, System::SharedPtr< MboxLoadOptions > options) | |
Initializes a new instance of the MboxStorageReader class. More... | |
MboxStorageReader (System::String fileName, System::SharedPtr< MboxLoadOptions > options) | |
Initializes a new instance of the MboxStorageReader class. More... | |
virtual void | Dispose (bool disposing) |
Releases unmanaged and - optionally - managed resources More... | |
virtual | ~MboxStorageReader () |
Protected Attributes | |
System::SharedPtr< System::Text::Encoding > | preferredTextEncoding |
Friends | |
class | Aspose::Email::Storage::Mbox::MboxoStorageReader |
class | Aspose::Email::Storage::Mbox::MboxrdStorageReader |
A base class for any mbox-based mail storage reader.
|
protected |
Initializes a new instance of the MboxStorageReader class.
stream | The stream. |
options | additional options when loading a Mbox storageMboxLoadOptions. |
ArgumentNullException | If given stream is null. |
|
protected |
Initializes a new instance of the MboxStorageReader class.
fileName | Name of the file. |
options | additional options when loading a Mbox storageMboxLoadOptions. |
ArgumentNullException | If filename is null or empty. |
|
protectedvirtual |
|
static |
Checks whether the array starts from given marker.
array | The array, can be null. |
marker | The marker, can't be null. |
|
static |
Determines whether the specified line contains asctime string.
currentLine | The current line. |
true
if the specified current line contains asctime; otherwise, false
.
|
static |
Creates the instance of reader.
stream | The stream. |
options | additional options when loading a Mbox storageMboxLoadOptions. |
ArgumentNullException |
|
static |
Creates the instance of reader.
fileName | |
options | additional options when loading a Mbox storageMboxLoadOptions. |
ArgumentNullException |
|
override |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
|
protectedvirtual |
Releases unmanaged and - optionally - managed resources
disposing | true to release both managed and unmanaged resources; false to release only unmanaged resources. |
System::SharedPtr<System::Collections::Generic::IEnumerable<System::SharedPtr<MboxMessageInfo> > > Aspose::Email::Storage::Mbox::MboxStorageReader::EnumerateMessageInfo | ( | ) |
Exposes the enumerator, which supports an iteration of messages in storage.
System::SharedPtr<System::Collections::Generic::IEnumerable<System::SharedPtr<MailMessage> > > Aspose::Email::Storage::Mbox::MboxStorageReader::EnumerateMessages | ( | ) |
Exposes the enumerator, which supports an iteration of messages in storage.
System::SharedPtr<System::Collections::Generic::IEnumerable<System::SharedPtr<MailMessage> > > Aspose::Email::Storage::Mbox::MboxStorageReader::EnumerateMessages | ( | System::SharedPtr< EmlLoadOptions > | options | ) |
Exposes the enumerator, which supports an iteration of messages in storage.
options | Specifies EmlLoadOptions when reading message from Mbox storage. |
System::SharedPtr<MailMessage> Aspose::Email::Storage::Mbox::MboxStorageReader::ExtractMessage | ( | System::String | id, |
System::SharedPtr< EmlLoadOptions > | options | ||
) |
Get the message from MBOX.
id | String representation of EntryId. |
options | Specifies EmlLoadOptions when reading message from Mbox storage. |
System::SharedPtr<System::IO::Stream> Aspose::Email::Storage::Mbox::MboxStorageReader::get_BaseStream | ( | ) | const |
Gets the base stream.
The base stream.
int64_t Aspose::Email::Storage::Mbox::MboxStorageReader::get_CurrentDataSize | ( | ) | const |
Gets the number of bytes that is read by ReadNextMessage method.
|
pure virtual |
Returns the number of messages in a storage.
Implemented in Aspose::Email::Storage::Mbox::MboxrdStorageReader, and Aspose::Email::Storage::Mbox::MboxoStorageReader.
VentureLicenseState Aspose::Email::Storage::Mbox::MboxStorageReader::GetVentureLicenseState | ( | ) |
|
pure virtual |
Gets the next message info.
Implemented in Aspose::Email::Storage::Mbox::MboxrdStorageReader, and Aspose::Email::Storage::Mbox::MboxoStorageReader.
|
static |
Reads the line from stream.
stream | The stream. |
|
pure virtual |
Reads the next message from underlying storage stream.
Implemented in Aspose::Email::Storage::Mbox::MboxrdStorageReader, and Aspose::Email::Storage::Mbox::MboxoStorageReader.
|
pure virtual |
Reads the next message from underlying storage stream.
options | Specifies EmlLoadOptions when reading message from Mbox storage. |
Implemented in Aspose::Email::Storage::Mbox::MboxrdStorageReader, and Aspose::Email::Storage::Mbox::MboxoStorageReader.
|
pure virtual |
Reads the next message from underlying storage stream.
fromMarker | Gets the From Marker while parsing the MBox Storage file. |
Implemented in Aspose::Email::Storage::Mbox::MboxrdStorageReader, and Aspose::Email::Storage::Mbox::MboxoStorageReader.
|
pure virtual |
Reads the next message from underlying storage stream.
fromMarker | Gets the From Marker while parsing the MBox Storage file. |
options | Specifies EmlLoadOptions when reading message from Mbox storage. |
Implemented in Aspose::Email::Storage::Mbox::MboxrdStorageReader, and Aspose::Email::Storage::Mbox::MboxoStorageReader.
|
protected |
Gets the number of bytes that is read by ReadNextMessage method.
void Aspose::Email::Storage::Mbox::MboxStorageReader::SplitInto | ( | int64_t | chunkSize, |
System::String | outputPath | ||
) |
Splits the mbox storage into less sized parts.
chunkSize | The approximate size of a chunk in bytes. |
outputPath | The folder path where chunks will be created. |
ArgumentException | Throws when the path parameter is null or empty. |
void Aspose::Email::Storage::Mbox::MboxStorageReader::SplitInto | ( | int64_t | chunkSize, |
System::String | outputPath, | ||
System::String | partFileNamePrefix | ||
) |
Splits the mbox storage into less sized parts.
chunkSize | The approximate size of a chunk in bytes. | ||
outputPath | The folder path where chunks will be created. | ||
partFileNamePrefix | The prefix to be added to the filename of each part of pst.
|
|
friend |
|
friend |
System::Event<void(System::SharedPtr<System::Object>, System::SharedPtr<MimeItemCopyEventArgs>)> Aspose::Email::Storage::Mbox::MboxStorageReader::EmlCopied |
Event that occurs after successful copy of a MailMessage object within the SplitInto(long, string) method.
System::Event<void(System::SharedPtr<System::Object>, System::SharedPtr<MimeItemCopyEventArgs>)> Aspose::Email::Storage::Mbox::MboxStorageReader::EmlCopying |
Event that occurs before the MailMessage object copy process, within the SplitInto(long, string) method.
|
static |
|
static |
|
static |
|
static |
"From " signature, indicates a start of the message.
System::Event<void(System::SharedPtr<System::Object>, System::SharedPtr<NewStorageEventArgs>)> Aspose::Email::Storage::Mbox::MboxStorageReader::MboxFileCreated |
Event that occurs when a new MBOX file is created during the SplitInto(long, string) method.
System::Event<void(System::SharedPtr<System::Object>, System::SharedPtr<NewStorageEventArgs>)> Aspose::Email::Storage::Mbox::MboxStorageReader::MboxFileFilled |
Event that occurs after filling an MBOX file with data within the SplitInto(long, string) method.
|
static |
The mbox format uses a single blank line followed by the string 'From ' (with a space) to delimit messages. In mboxo format sender's email address in message delimiter is replaced by the constant string '???@???', i.e. 'From ???@???'
int32_t Aspose::Email::Storage::Mbox::MboxStorageReader::msgCount |
System::SharedPtr<System::Object> Aspose::Email::Storage::Mbox::MboxStorageReader::mVentureLicense |
|
protected |