Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

API

SDK

Tips ‘n’ Tricks

Miscellaneous


:: com :: sun :: star :: embed ::

interface XOptimizedStorage
Description
This is a temporary interface that is introduced to temporarily optimize the document storing process. PLEASE DO NOT USE IT, it might change in any time and will be depricated soon! Another solution will be introduced as final one.

Methods' Summary
insertRawNonEncrStreamElementDirect allows to insert a raw stream representing nonencrypted stream with header.  
insertStreamElementDirect allows to insert a stream to the storage directly. The stream must stay alive till the storage is commited.  
copyElementDirectlyTo allows to copy storage element directly, not guarantied to work.  
writeAndAttachToStream allows to switch storage persistence to the provided stream. The stream will be filled by the storage. If an empty reference is provided, the storage will create a temporary stream to switch to itself. It is applicable only for root storages.  
attachToURL allows to switch storage persistence to the provided URL. The caller is responsible to be sure that the file referenced by the URL contains the same contents as the stream the storage is based currently. Thus using of this method is very dangerous and should be avoided when possible. It is applicable only for root storages.  
getElementPropertyValue allows to get property of the child element with the specified name. The implementation of the method might allow to access only subset of the supported by element properties.  
copyStreamElementData fills the provided stream with the last flushed version of data from the child stream of the storage.  
Methods' Details
insertRawNonEncrStreamElementDirect
void
insertRawNonEncrStreamElementDirect( [in] string  sStreamName,
[in] ::com::sun::star::io::XInputStream  xInStream )
raises( InvalidStorageException,
::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::packages::NoRawFormatException,
::com::sun::star::container::ElementExistException,
::com::sun::star::io::IOException,
StorageWrappedTargetException );

Description
allows to insert a raw stream representing nonencrypted stream with header.
insertStreamElementDirect
void
insertStreamElementDirect( [in] string  sStreamName,
[in] ::com::sun::star::io::XInputStream  xInStream,
[in] sequence< ::com::sun::star::beans::PropertyValue >  aProperties )
raises( InvalidStorageException,
::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::container::ElementExistException,
::com::sun::star::io::IOException,
StorageWrappedTargetException );

Description
allows to insert a stream to the storage directly. The stream must stay alive till the storage is commited.
copyElementDirectlyTo
void
copyElementDirectlyTo( [in] string  sSourceName,
[in] XOptimizedStorage  xTargetStorage,
[in] string  sTargetName )
raises( InvalidStorageException,
::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::container::NoSuchElementException,
::com::sun::star::container::ElementExistException,
::com::sun::star::io::IOException,
StorageWrappedTargetException );

Description
allows to copy storage element directly, not guarantied to work.
writeAndAttachToStream
void
writeAndAttachToStream( [in] ::com::sun::star::io::XStream  xStream )
raises( InvalidStorageException,
::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::io::IOException,
StorageWrappedTargetException );

Description
allows to switch storage persistence to the provided stream. The stream will be filled by the storage. If an empty reference is provided, the storage will create a temporary stream to switch to itself. It is applicable only for root storages.
attachToURL
void
attachToURL( [in] string  sURL,
[in] boolean  bReadOnly )
raises( InvalidStorageException,
::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::io::IOException,
StorageWrappedTargetException );

Description
allows to switch storage persistence to the provided URL. The caller is responsible to be sure that the file referenced by the URL contains the same contents as the stream the storage is based currently. Thus using of this method is very dangerous and should be avoided when possible. It is applicable only for root storages.
getElementPropertyValue
any
getElementPropertyValue( [in] string  sElementName,
[in] string  sPropertyName )
raises( InvalidStorageException,
::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::container::NoSuchElementException,
::com::sun::star::io::IOException,
::com::sun::star::beans::UnknownPropertyException,
::com::sun::star::beans::PropertyVetoException,
StorageWrappedTargetException );

Description
allows to get property of the child element with the specified name. The implementation of the method might allow to access only subset of the supported by element properties.
copyStreamElementData
void
copyStreamElementData( [in] string  sStreamName,
[in] ::com::sun::star::io::XStream  xTargetStream )
raises( InvalidStorageException,
::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::packages::WrongPasswordException,
::com::sun::star::io::IOException,
StorageWrappedTargetException );

Description
fills the provided stream with the last flushed version of data from the child stream of the storage.
Parameter sStreamName
the name of the substream that should be copied
Parameter xTargetStream
the target stream where the data must be copied to
Throws
::com::sun::star::embed::InvalidStorageException this storage is in invalid state for any reason
Throws
::com::sun::star::lang::IllegalArgumentException one of provided arguments is illegal
Throws
::com::sun::star::packages::WrongPasswordException the provided password is wrong
Throws
::com::sun::star::io::IOException in case of io errors during stream opening
Throws
::com::sun::star::embed::StorageWrappedTargetException wraps other exceptions
Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.