Hello,
I have looked for provider which could parse large mbox file. I tried mstor and he throws this exeption for large file:
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Unknown Source)
at java.io.ByteArrayOutputStream.write(Unknown Source)
at com.sun.mail.util.ASCIIUtility.getBytes(ASCIIUtility.java:247)
at javax.mail.internet.MimeMessage.parse(MimeMessage.java:317)
at net.fortuna.mstor.MStorMessage.checkParse(Unknown Source)
at net.fortuna.mstor.MStorMessage.getAllHeaders(Unknown Source)
at net.fortuna.mstor.data.MetaFolderImpl.getMessage(Unknown Source)
at net.fortuna.mstor.MStorFolder.getMessage(Unknown Source)
at TestMail.main(TestMail.java:61)
I'm getting this exception either I use folder.getMessages() or folder.getMessage(1) in couple iterations.
Also I have put in classpath MboxStore.jar but this porvider is not in the list of provider.
Exception in thread "main" javax.mail.NoSuchProviderException: No provider for mbox
at javax.mail.Session.getProvider(Session.java:455)
at javax.mail.Session.getStore(Session.java:530)
at TestMail.main(TestMail.java:25)
Does anyone can help about one of these problems or to tell me for some other, better, provider?
Thanks in advance!
Best Regards,
Nikola Putnik