Hello Team,
I have to read MBOX file and convert it in to PST file on Mac OS X. I am using Aspose.Email for Java API. While reading MBOX file using MboxrdStorageReader, it is taking huge memory greater than 1GB. My MBOX file is of 2GB. Memory is not deallocated from your side please take care of it. Please find the below code for your reference.
******** Source Code *******
MboxrdStorageReader objMBOXReader = null;
try
{
objMBOXReader = new MboxrdStorageReader(this.m_StrSourceFilePath, true);
int f_intMailCount = 0;
while ((f_objMailMessage = objMBOXReader.readNextMessage()) != null //iterate mails
{
try
{
f_intMailCount++;
}
catch(Exception pObj)
{
pObj.printStackTrace();
}
}//end of while loop
}//end of outer try
catch(Exception pObj)
{
pObj.printStackTrace();
}