File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other JSE/JEE APIs and the fly likes Treat in memory string as file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Treat in memory string as file" Watch "Treat in memory string as file" New topic
Author

Treat in memory string as file

Aryan Khan
Ranch Hand

Joined: Sep 12, 2004
Posts: 290

Hi,
I am using java mail api for sending emails with attachments.
Java mail api supports attachments via FileDataSource and URLDataSource from JAF. Is there any way I can attach some in memory string as attachement rather than writing it to a file and attaching?
Thanks


OCP/MCP/SCJP/SCWCD/IBM XML/SCMAD/SCEA-1
Aryan Khan
Ranch Hand

Joined: Sep 12, 2004
Posts: 290

Here is the solution.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Treat in memory string as file