• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

java mail API uses streaming

 
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?

 
My cellmate was this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic