Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

java mail API uses streaming  RSS feed

 
gaurav abbi
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
does java mail API uses streaming? where can i get the source code to confirm this.
also i am tryign to send the mail using raw and non-raw mode.
in raw mode i can pass an input Stream to MimeMessage constructor:


In Non-raw mode, i have to do the following
Since there can be any mime type, so i have to use DataHandler and DataSource. Since the DataSource interface contracts says of providing the fresh inputStream everytime we invoke getInputStream(), we need to keep the data in the byte[] which will throw OOM for large size or documents Is there a way to avoid this?

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!