Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

MimeMessage.writeTo - performance problem in Applet

994350Mar 1 2013 — edited Mar 3 2013
Dear All

I'm having a problem while using writeTo method for large mime messages in my applet. it takes at least 30 seconds for a 5MB of mime message.

OutputStream out = new FileOutputStream(new File("D:/test.eml"));
msg.writeTo(out);

my applet is signed and has no problem with accessing local disk and creating files on it.
I have also tried;

ByteArrayOutputStream baos = new ByteArrayOutputStream();
msg.writeTo(baos);

nothing changed. writeTo always takes to much time in both ways.

but, if i try the same thing on a desktop application, everything is fine. for example, writeTo is completed in less than a second for a 8MB of mime message.

why does writing to outputstream in Applet take longer? is there anything i can do to improve the performance?
any advise would be appreciated, thank you very much
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 31 2013
Added on Mar 1 2013
10 comments
5,529 views