Map/*<String,Object>*/ loadProperties = new HashMap();
loadProperties.putAll(getDefaultLoadProperties());
loadProperties.putAll(importOptions);
// doesn't work using InputStreamToXInputStreamAdapter; probably because it's not XSeekable
//property("InputStream", new InputStreamToXInputStreamAdapter(inputStream))
loadProperties.put("InputStream", new ByteArrayToXInputStreamAdapter(IOUtils.toByteArray(inputStream)));
XComponent document = desktop.loadComponentFromURL("private:stream", "_blank", 0, toPropertyValues(loadProperties));
if (document == null) {
throw new OpenOfficeException("conversion failed: input document is null after loading");
}