Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Embedding data in a Java program

Status
Not open for further replies.

obscurifer

Technical User
Apr 3, 2001
53
US
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?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top