Hello Team,
Hi,
Thank you for writing to Aspose Support team.
msg.getAttachments().add(“Test.txt”, new byte[7010241024]); //70 MB
PersonalStorage pst = PersonalStorage.create(“152112\test70Mb.pst”, FileFormatVersion.Unicode);
FolderInfo fi = pst.getRootFolder().addSubFolder(“Test”);
fi.addMessage(msg);
pst.dispose();
I have added a attachment with 125 MB. then it shows exception below this:-
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at com.aspose.email.system.io.MemoryStream.setCapacity(Unknown Source)
at com.aspose.email.system.io.MemoryStream.b(Unknown Source)
at com.aspose.email.system.io.MemoryStream.write(Unknown Source)
at com.aspose.email.mw.write(SourceFile:321)
at com.aspose.email.dv.a(SourceFile:167)
at com.aspose.email.agh.a(SourceFile:377)
at com.aspose.email.agh.a(SourceFile:252)
at com.aspose.email.agh.a(SourceFile:265)
at com.aspose.email.agh.c(SourceFile:157)
at com.aspose.email.MailMessage.a(SourceFile:1402)
at com.aspose.email.MailMessage.b(SourceFile:1316)
at com.aspose.email.MailMessage.a(SourceFile:1238)
at com.aspose.email.MailMessage.load(SourceFile:1223)
at SysTools.MBOX_Reader.main
Hi,