Examples of XSimpleFileAccess2


Examples of com.sun.star.ucb.XSimpleFileAccess2

            LogUtils.DEBUG("ParcelContainer.createParcel, folder " + pathToParcel  + " created ");

            ParcelDescriptor pd = new ParcelDescriptor();
            pd.setLanguage( language );
            String parcelDesc = PathUtils.make_url( pathToParcel, ParcelDescriptor.PARCEL_DESCRIPTOR_NAME );
            XSimpleFileAccess2 xSFA2 = ( XSimpleFileAccess2 )
                UnoRuntime.queryInterface( XSimpleFileAccess2.class, m_xSFA );
            if ( xSFA2 != null )
            {                       
                LogUtils.DEBUG("createParcel() Using XSIMPLEFILEACCESS2 " + parcelDesc );
                ByteArrayOutputStream bos = new ByteArrayOutputStream( 1024 );
                pd.write( bos );
                bos.close();
                ByteArrayInputStream bis = new ByteArrayInputStream( bos.toByteArray() );                
                XInputStreamImpl xis = new XInputStreamImpl( bis );
                xSFA2.writeFile( parcelDesc, xis );
                xis.closeInput();
                p = loadParcel( pathToParcel );
            }
        }
        catch ( Exception e )
View Full Code Here

Examples of com.sun.star.ucb.XSimpleFileAccess2

               com.sun.star.uno.Exception, java.io.IOException
    {
        String pathToDescriptor = PathUtils.make_url(
            getPathToParcel(),  ParcelDescriptor.PARCEL_DESCRIPTOR_NAME );

        XSimpleFileAccess2 xSFA2 = ( XSimpleFileAccess2 )
            UnoRuntime.queryInterface( XSimpleFileAccess2.class, m_xSFA );

        if ( xSFA2 != null )
        {
            ByteArrayOutputStream bos = null;
            ByteArrayInputStream bis = null;
            XInputStreamImpl xis = null;
            try
            {
                bos = new ByteArrayOutputStream( 1024 );
                m_descriptor.write( bos );
                bis = new ByteArrayInputStream( bos.toByteArray() );

                xis = new XInputStreamImpl( bis );
                xSFA2.writeFile( pathToDescriptor, xis );
            }
            finally
            {
                if (bos != null) bos.close();
                if (bis != null) bis.close();
View Full Code Here

Examples of com.sun.star.ucb.XSimpleFileAccess2

        String sourceFilePath = parent.getPathToParcel() + "/" + getLanguageName();
        boolean result = false;
        OutputStream os = null;
        try
        {
            XSimpleFileAccess2 xSFA2 = ( XSimpleFileAccess2 )
                UnoRuntime.queryInterface( XSimpleFileAccess2.class,
                    parent.m_xSFA );
            if ( xSFA2 != null )
            {
                ByteArrayInputStream bis = new ByteArrayInputStream( getSourceBytes() );
                XInputStreamImpl xis = new XInputStreamImpl( bis );
                xSFA2.writeFile( sourceFilePath, xis );
                xis.closeInput();
                result = true;
            }
        }
        // TODO re-examine exception processing should probably throw
View Full Code Here

Examples of com.sun.star.ucb.XSimpleFileAccess2

               com.sun.star.uno.Exception, java.io.IOException
    {
        String pathToDescriptor = PathUtils.make_url(
            getPathToParcel(),  ParcelDescriptor.PARCEL_DESCRIPTOR_NAME );

        XSimpleFileAccess2 xSFA2 = ( XSimpleFileAccess2 )
            UnoRuntime.queryInterface( XSimpleFileAccess2.class, m_xSFA );

        if ( xSFA2 != null )
        {
            ByteArrayOutputStream bos = null;
            ByteArrayInputStream bis = null;
            XInputStreamImpl xis = null;
            try
            {
                bos = new ByteArrayOutputStream( 1024 );
                m_descriptor.write( bos );
                bis = new ByteArrayInputStream( bos.toByteArray() );

                xis = new XInputStreamImpl( bis );
                xSFA2.writeFile( pathToDescriptor, xis );
            }
            finally
            {
                if (bos != null) bos.close();
                if (bis != null) bis.close();
View Full Code Here

Examples of com.sun.star.ucb.XSimpleFileAccess2

        String sourceFilePath = parent.getPathToParcel() + "/" + getLanguageName();
        boolean result = false;
        OutputStream os = null;
        try
        {
            XSimpleFileAccess2 xSFA2 = ( XSimpleFileAccess2 )
                UnoRuntime.queryInterface( XSimpleFileAccess2.class,
                    parent.m_xSFA );
            if ( xSFA2 != null )
            {
                ByteArrayInputStream bis = new ByteArrayInputStream( getSourceBytes() );
                XInputStreamImpl xis = new XInputStreamImpl( bis );
                xSFA2.writeFile( sourceFilePath, xis );
                xis.closeInput();
                result = true;
            }
        }
        // TODO re-examine exception processing should probably throw
View Full Code Here

Examples of com.sun.star.ucb.XSimpleFileAccess2

            LogUtils.DEBUG("ParcelContainer.createParcel, folder " + pathToParcel  + " created ");

            ParcelDescriptor pd = new ParcelDescriptor();
            pd.setLanguage( language );
            String parcelDesc = PathUtils.make_url( pathToParcel, ParcelDescriptor.PARCEL_DESCRIPTOR_NAME );
            XSimpleFileAccess2 xSFA2 = ( XSimpleFileAccess2 )
                UnoRuntime.queryInterface( XSimpleFileAccess2.class, m_xSFA );
            if ( xSFA2 != null )
            {                       
                LogUtils.DEBUG("createParcel() Using XSIMPLEFILEACCESS2 " + parcelDesc );
                ByteArrayOutputStream bos = new ByteArrayOutputStream( 1024 );
                pd.write( bos );
                bos.close();
                ByteArrayInputStream bis = new ByteArrayInputStream( bos.toByteArray() );                
                XInputStreamImpl xis = new XInputStreamImpl( bis );
                xSFA2.writeFile( parcelDesc, xis );
                xis.closeInput();
                p = loadParcel( pathToParcel );
            }
        }
        catch ( Exception e )
View Full Code Here

Examples of com.sun.star.ucb.XSimpleFileAccess2

        String sourceFilePath = parent.getPathToParcel() + "/" + getLanguageName();
        boolean result = false;
        OutputStream os = null;
        try
        {
            XSimpleFileAccess2 xSFA2 = ( XSimpleFileAccess2 )
                UnoRuntime.queryInterface( XSimpleFileAccess2.class,
                    parent.m_xSFA );
            if ( xSFA2 != null )
            {
                ByteArrayInputStream bis = new ByteArrayInputStream( getSourceBytes() );
                XInputStreamImpl xis = new XInputStreamImpl( bis );
                xSFA2.writeFile( sourceFilePath, xis );
                xis.closeInput();
                result = true;
            }
        }
        // TODO re-examine exception processing should probably throw
View Full Code Here

Examples of com.sun.star.ucb.XSimpleFileAccess2

            LogUtils.DEBUG("ParcelContainer.createParcel, folder " + pathToParcel  + " created ");

            ParcelDescriptor pd = new ParcelDescriptor();
            pd.setLanguage( language );
            String parcelDesc = PathUtils.make_url( pathToParcel, ParcelDescriptor.PARCEL_DESCRIPTOR_NAME );
            XSimpleFileAccess2 xSFA2 = ( XSimpleFileAccess2 )
                UnoRuntime.queryInterface( XSimpleFileAccess2.class, m_xSFA );
            if ( xSFA2 != null )
            {                       
                LogUtils.DEBUG("createParcel() Using XSIMPLEFILEACCESS2 " + parcelDesc );
                ByteArrayOutputStream bos = new ByteArrayOutputStream( 1024 );
                pd.write( bos );
                bos.close();
                ByteArrayInputStream bis = new ByteArrayInputStream( bos.toByteArray() );                
                XInputStreamImpl xis = new XInputStreamImpl( bis );
                xSFA2.writeFile( parcelDesc, xis );
                xis.closeInput();
                p = loadParcel( pathToParcel );
            }
        }
        catch ( Exception e )
View Full Code Here

Examples of com.sun.star.ucb.XSimpleFileAccess2

               com.sun.star.uno.Exception, java.io.IOException
    {
        String pathToDescriptor = PathUtils.make_url(
            getPathToParcel(),  ParcelDescriptor.PARCEL_DESCRIPTOR_NAME );

        XSimpleFileAccess2 xSFA2 = ( XSimpleFileAccess2 )
            UnoRuntime.queryInterface( XSimpleFileAccess2.class, m_xSFA );

        if ( xSFA2 != null )
        {
            ByteArrayOutputStream bos = null;
            ByteArrayInputStream bis = null;
            XInputStreamImpl xis = null;
            try
            {
                bos = new ByteArrayOutputStream( 1024 );
                m_descriptor.write( bos );
                bis = new ByteArrayInputStream( bos.toByteArray() );

                xis = new XInputStreamImpl( bis );
                xSFA2.writeFile( pathToDescriptor, xis );
            }
            finally
            {
                if (bos != null) bos.close();
                if (bis != null) bis.close();
View Full Code Here

Examples of com.sun.star.ucb.XSimpleFileAccess2

        String sourceFilePath = parent.getPathToParcel() + "/" + getLanguageName();
        boolean result = false;
        OutputStream os = null;
        try
        {
            XSimpleFileAccess2 xSFA2 = ( XSimpleFileAccess2 )
                UnoRuntime.queryInterface( XSimpleFileAccess2.class,
                    parent.m_xSFA );
            if ( xSFA2 != null )
            {
                ByteArrayInputStream bis = new ByteArrayInputStream( getSourceBytes() );
                XInputStreamImpl xis = new XInputStreamImpl( bis );
                xSFA2.writeFile( sourceFilePath, xis );
                xis.closeInput();
                result = true;
            }
        }
        // TODO re-examine exception processing should probably throw
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.