Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Viewing a file from an applet.  RSS feed

 
Angelino Dolce
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All!
My question is:
I have an array di bytes in memory (rapresenting a MS Word document) in an applet.
How can I instruct the browser to open this file from my applet?
(An analogue method of getAppletContext().showDocument(Url), but instead of an URL I've a bytearray in memory).
Thank You in advance.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't. You'll need to write those bytes to a file, and then you can open the file with the browser or Word. The applet needs to be signed to be allowed to do this.
 
Angelino Dolce
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank You very much, Ulf.
by Angelo.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!