:: com :: sun :: star :: embed ::
|
service StorageStream |
- Description
- This is a service that represents a stream that can be provided by
XStorage::openStreamElement() call implemented by
Storage service.
In case a stream is open with readwrite access only one instance
of the stream can exist.
|
Properties' Summary |
string
MediaType |
allows to get and set media type of the stream.
|
boolean
IsCompressed |
specifies if the stream should be compressed next time it is stored.
|
[ readonly ] boolean
IsEncrypted |
allows to detect if the stream is encrypted.
|
boolean
UseCommonStoragePasswordEncryption |
specifies whether the stream will become encrypted next time the
common storage password holder is commited.
|
[ readonly ] long
Size |
allows to detect size of the stream in bytes.
|
Exported Interfaces - Details |
::com::sun::star::io::XStream
- Description
- allows to get access to ::com::sun::star::io::XInputStream
and ::com::sun::star::io::XOutputStream
implementations.
In case the storage stream is open readonly the returned reference
to ::com::sun::star::io::XOutputStream will be
empty.
|
|
::com::sun::star::lang::XComponent
- Description
- allows to control object lifetime.
A storage stream is created by a storage and has a restrictions
depending on the mode the stream is opened in.
In case a stream is opened with read-write access only one instance of
the stream can exist. It means that the stream can not be reopened
even for readonly access until the readwrite instance is disposed.
From the other side it is possible to open multiple streams for
readonly access. But because of the rule mentioned above it will not
be possible to open the stream for read-write access until all the
readonly instances are disposed.
The stream must be disposed by
::com::sun::star::lang::XComponent::dispose()
call or by explicit closing of input and output ( if provided )
streams implementations with
::com::sun::star::io::XInputStream::closeInput()
and
::com::sun::star::io::XOutputStream::closeOutput()
calls.
When a stream is disposed all the changes that were done for it are
automatically flashed, so that they becomes visible from parent
storage. It is also possible to flash the stream explicitly.
In case parent storage is disposed the stream is disposed
automatically.
In case a stream is disposed any call to it's methods should result in
::com::sun::star::lang::DisposedException.
|
|
::com::sun::star::beans::XPropertySet
- Description
- allows to get access to stream properties.
|
|
::com::sun::star::io::XSeekable
- Usage Restrictions
- optional
- Description
- allows to seek to a specified position within the stream.
This interface must be supported in case either seekable readonly
or read-write access is requested.
|
|
XEncryptionProtectedSource
- Usage Restrictions
- optional
- Description
- allows to set password to the stream.
This interface must be supported by a stream with readwrite access
to allow to set a password that should be used next time the
stream is stored.
If the password is set or changed by this interface and the
stream is closed the new password should be used to get access to the
stream next time.
|
|
Properties' Details |
MediaType
string MediaType;
- Description
- allows to get and set media type of the stream.
|
|
IsCompressed
boolean IsCompressed;
- Description
- specifies if the stream should be compressed next time it is stored.
|
|
IsEncrypted
[ readonly ] boolean IsEncrypted;
- Description
- allows to detect if the stream is encrypted.
The property value true means that the stream is currently encrypted.
false - the stream is not encrypted.
If somebody sets a password explicitly by using
XEncryptionProtectedSource interface the value is
automatically set to true. If the interface is used to remove
the encryption - the value is automatically set to false.
|
|
UseCommonStoragePasswordEncryption
boolean UseCommonStoragePasswordEncryption;
- Description
- specifies whether the stream will become encrypted next time the
common storage password holder is commited.
The property value true means that the stream will become encrypted
after the closest storage in the parent hierarchy, that has common
storage password, is commited.
false - the stream will not react to commit of such a storage.
In case stream is not encrypted and the property is set to true,
the stream will stay nonencrypted until the closest storage
in the parent hierarchy, that has common storage password, is commited.
On the commit the stream will be encrypted with the common storage
password. If there is no such storage in the hierarchy the stream
will not be encrypted at all.
Thus this property must be set very carefully.
If somebody sets a password explicitly by using
XEncryptionProtectedSource interface the value is
automatically set to false and the stream becomes encrypted
with specified password immediatelly.
In case stream is encrypted one and the value is set to true
the stream becomes nonencrypted until the common storage password
holder is commited. The data about previously set password ( if any )
will be removed and the stream can be accessed as nonencrypted stream.
|
|
Size
[ readonly ] long Size;
- Description
- allows to detect size of the stream in bytes.
|
|
Top of Page
Copyright © 2013, The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache, the Apache feather logo, Apache OpenOffice and OpenOffice.org are trademarks of The Apache Software Foundation. Other names may be trademarks of their respective owners.