SmartGridready / SGrJava

SmartGridready communication handler in Java
0 stars 0 forks source link

DeviceDescriptionLoader load from String or InputStream #52

Closed mkrebs81 closed 5 months ago

mkrebs81 commented 5 months ago

I suggest adding load() methods that allow loading a device description directly from an XML string or input stream.

That would be convenient, since these conversions happen internally anyway.

It would also circumvent a problem I encountered when I tried to load a device description from a temporary file created using Files.createTempFile(...). This worked on a Mac, but not on Windows (Resource resource = domain.createResource( aBaseDir + aDescriptionFile ); becomes NULL).

I suspect that an absolute path starting with C:\.... confuses the resource loader.