Package com.sun.star.io

Examples of com.sun.star.io.XOutputStream.writeBytes()


        try {
            //Decode and write the data to an temp stream
            byte[] oledata = Base64.decode(aBase64);
            m_RootStream = CreateTempFileStream(m_xMSF);
            XOutputStream xOutput = m_RootStream.getOutputStream();
            xOutput.writeBytes(oledata);
            xOutput.flush();
            //Get the input stream and seek to begin
            XInputStream xInput = m_RootStream.getInputStream();
            XSeekable xSeek = (XSeekable) UnoRuntime.queryInterface(XSeekable.class, xInput);
            xSeek.seek(0);
View Full Code Here


            byte oleHead[] = new byte[4];
            oleHead[0] = (byte) ((oledata.length >>> 0) & 0xFF);
            oleHead[1] = (byte) ((oledata.length >>> 8) & 0xFF);
            oleHead[2] = (byte) ((oledata.length >>> 16) & 0xFF);
            oleHead[3] = (byte) ((oledata.length >>> 24) & 0xFF);
            xOutput.writeBytes(oleHead);

            // Compress the bytes
            byte[] output = new byte[oledata.length];
            Deflater compresser = new Deflater();
            compresser.setInput(oledata);
View Full Code Here

            for (int i = 0; i < compressedDataLength; i++) {
                compressedBytes[i] = output[i];
            }

            //write the compressed data to the temp stream
            xOutput.writeBytes(compressedBytes);
            //seek to 0
            XSeekable xSeek = (XSeekable) UnoRuntime.queryInterface(XSeekable.class, xInput);
            xSeek.seek(0);
            xSeek = null;
            oledata = null;
View Full Code Here

    XOutputStream rOut = (XOutputStream) rSmgr.createInstance("com.sun.star.io.Pipe");

    {
      byte bytes[] = new byte[10];
      bytes[0] = 42;
      rOut.writeBytes(bytes);
    }
 
   
    {
      byte bytes[][] = new byte[1][];
View Full Code Here

                    XInputStream xInputStream = xStream.getInputStream();
                    if ( xOutputStream != null && xInputStream != null )
                    {
                        String sHTML = sHTMLHeader.concat( sArticle );
                        sHTML = sHTML.concat( sHTMLFooter );
                        xOutputStream.writeBytes( sHTML.getBytes( "UTF-8" ) );           
                        // xOutputStream.closeOutput();
                        xSeekable.seek( 0 )
                       
                        xResult = xInputStream;
                    }
View Full Code Here

                    XInputStream xInputStream = xStream.getInputStream();
                    if ( xOutputStream != null && xInputStream != null )
                    {
                        String sHTML = sHTMLHeader.concat( sArticle );
                        sHTML = sHTML.concat( sHTMLFooter );
                        xOutputStream.writeBytes( sHTML.getBytes( "UTF-8" ) );           
                        // xOutputStream.closeOutput();
                        xSeekable.seek( 0 )
                       
                        xResult = xInputStream;
                    }
View Full Code Here

    XOutputStream rOut = (XOutputStream) rSmgr.createInstance("com.sun.star.io.Pipe");

    {
      byte bytes[] = new byte[10];
      bytes[0] = 42;
      rOut.writeBytes(bytes);
    }
 
   
    {
      byte bytes[][] = new byte[1][];
View Full Code Here

                    XInputStream xInputStream = xStream.getInputStream();
                    if ( xOutputStream != null && xInputStream != null )
                    {
                        String sHTML = sHTMLHeader.concat( sArticle );
                        sHTML = sHTML.concat( sHTMLFooter );
                        xOutputStream.writeBytes( sHTML.getBytes( "UTF-8" ) );           
                        // xOutputStream.closeOutput();
                        xSeekable.seek( 0 )
                       
                        xResult = xInputStream;
                    }
View Full Code Here

            XTruncate xTruncate = ( XTruncate ) UnoRuntime.queryInterface( XTruncate.class, xOutStream );
            if ( xTruncate == null )
                throw new com.sun.star.io.IOException();

            xTruncate.truncate();
            xOutStream.writeBytes( aString.getBytes() );

            // save the size
            xStream = xStorage.openStreamElement( "properties.txt", com.sun.star.embed.ElementModes.READWRITE );
            xStreamComp = ( XComponent ) UnoRuntime.queryInterface( XComponent.class, xStream );
            if ( xStreamComp == null )
View Full Code Here

            char[] aLinkChar = m_aLinkURI.toCharArray();
            byte[] aLinkBytes = new byte[ aLinkChar.length ];
            for ( int ind = 0; ind < aLinkChar.length; ind++ )
              aLinkBytes[ind] = (byte)aLinkChar[ind];
 
            xLinkOutStream.writeBytes( aLinkBytes );
            xLinkOutStream.closeOutput();
 
            XComponent xComponent = (XComponent) UnoRuntime.queryInterface( XComponent.class,
                                            xLinkStream );
            if ( xComponent != null )
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.