• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Activation Framework: DataHandler from Byte Source?

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic