I have an assignment which involves developing an NPAPI (C++) plugin for an older version of Firefox. The plugin receives a decrypted byte array from an external library and renders the content on a webpage. The plugin so far works with images and various text files by utilizing NPAPI's drawing/window capabilities, however there is also an interest in allowing it to render JAR/WAR applets.
Unless I am mistaken, there is no way to "draw" a Java program with NPAPI, so it must be handled by Firefox. And since the plugin is dealing with encryption and decryption of secure content, it seems it would defeat the purpose to write the bytes back to a JAR file in the users browser.
Basically my question is this: would it be possible to stream the raw bytes of a JAR file from plugin to browser and have it execute on the browser without storing a temp file?