• Post Reply Bookmark Topic Watch Topic
  • New Topic

Activation Framework: DataHandler from Byte Source?  RSS feed

 
Gareth Western
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a program which frequently creates attachments for sending. Currently this involves converting a byte[] into a file (using a ByteArrayOutputStream) and then converting the file to a DataHandler. Is there any easier way? I've seen a few references to a 'ByteArrayDataSource' from which one can directly construct the DataHandler, however I can't find any documentation regarding this class. I guess it's not a part of the official activation framework. Anyone have any suggestions for a more efficient method than the whole process of writing->attaching->sending->deleting lots of files?

cheers,
Gareth
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!