Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What is a FileDataSource?

filedatasource
0
Posted

What is a FileDataSource?

0

Location: http://www.jguru.com/faq/view.jsp?EID=237612 Created: Oct 26, 2000 Modified: 2000-10-26 10:08:07.138 Author: John Zukowski (http://www.jguru.com/guru/viewbio.jsp?EID=7) Question originally posed by Chandra Prasad Reddy (http://www.jguru.com/guru/viewbio.jsp?EID=231859 A FileDataSource is part of the JavaBeans Activation Framework, package javax.activation. It represents a DataSource associated with a file, that relies on a FileTypeMap to associate mime types with file extensions. They can be used to send file attachments: MimeBodyPart messageBodyPart = new MimeBodyPart(); DataSource source = new FileDataSource(fileAttachment); messageBodyPart.setDataHandler( new DataHandler(source)); messageBodyPart.setFileName( filenameString); The other type of predefined DataSource in the Activation Framework is the URLDataSource.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123