Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Pdf upload/download  RSS feed

 
Stefan Gerber
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I want upload/download a pdf files. Now i have seen that on several examples a javax.activation.DataHandler is used. Why?
I'm using jax-ws. Is it not simpler just to use a byte[] to transfer the data?

thanks for your response.
 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Raw bytes can't be used in XML (which is a text protocol). The benefit of DataHandler is that it uses a cross-platform compatible representation of the data, which is important for web services.
 
Stefan Gerber
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Thanks for the answer. But i made an example where is use a byte[] to transfer the data and it works. How is the compatibility of this DataHandler to other programm language like .net, vb,... ?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!