arsenius - 2005-01-21

I'm trying to load device and service descriptions from jar files or off of a website.  I have been copying them out to disk at runtime and reading the files from there, but unfortunately when I run my device as an applet it can't always read the files back after they are copied (if the applet is loaded from the local machine, instead of off of a website).

Ideally, I would like to pass a URL to create the Device (This would allow me to load the file from wherever the applet was loaded from, be it from a jar, remote or local applet, or as an application).  Then I could load a description either from within a Jar file, or off of a website (either would be ok).  I have used an InputStream, but since the service description is in a separate file from the device, the parser can't locate it when it tries to create the Service.

I looked at, but I can't tell how important it is for the device description to be in the filesystem.

I tried adding a new loadDescription(URL) and URL constructor to, but in the end it still ends up being treated as an InputStream with the same problems.

Can someone help me understand what I need to setup in the DeviceData class, or in the parser so that the parser is aware of the base of the file it initially started parsing?  Or alternatively, is it possible for me to embed the service within the device description?