Package com.sun.star.lib.uno.adapter

Examples of com.sun.star.lib.uno.adapter.ByteArrayToXInputStreamAdapter


        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");
        }
View Full Code Here


    XComponent document = desktop.loadComponentFromURL("private:stream", "_blank", 0, new PropertyValue[] {
      property("ReadOnly", Boolean.TRUE),
      property("Hidden", Boolean.TRUE),
      // doesn't work using InputStreamToXInputStreamAdapter; probably because it's not XSeekable
      //property("InputStream", new InputStreamToXInputStreamAdapter(inputStream))
      property("InputStream", new ByteArrayToXInputStreamAdapter(IOUtils.toByteArray(inputStream)))
    });
   
    refreshDocument(document);
   
    try {
View Full Code Here

TOP

Related Classes of com.sun.star.lib.uno.adapter.ByteArrayToXInputStreamAdapter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.