obscurifer
Technical User
In Perl, one can embed data in the actual program by including an __END__ directive. Anything else in the Perl source file, including binary data, is treated as file input that can be seen by using the DATA file handle.
I want to write a Java applet that plays a midi file on the web, but I don't want the midi file to be available for a user to grab (copyright issues with the author). The midi can't be in the browser cache, and I really don't want it to be in a jar, so my thought was that I might be able to embed it in the source file as data, but I'm inherently lazy, and I don't want to think too hard.
Does anyone know whether Java can support something similar to Perl's ability to embed data?
I want to write a Java applet that plays a midi file on the web, but I don't want the midi file to be available for a user to grab (copyright issues with the author). The midi can't be in the browser cache, and I really don't want it to be in a jar, so my thought was that I might be able to embed it in the source file as data, but I'm inherently lazy, and I don't want to think too hard.
Does anyone know whether Java can support something similar to Perl's ability to embed data?