Overview | Module | Use | Devguide | Index

Methods' Summary | Methods' Details | Attributes' Summary | Attributes' Details

:: com :: sun :: star :: io ::
interface XPersistObject
  Base Hierarchy
      ::com::sun::star::uno::XInterface
       |
       +-XPersistObject
Description allows to make UNO objects persistent Every UNO object, that wants to be serializable, should implement this interface. The object stores stores itself, when the write method is called. The object needs to be created before it deserializes itself again (by using the read method). Therefor it must be createable by name via a factory, which is in general the global service manager. The create and read mechanism is implemented by the ObjectInputStream . The serialization format (the series of strings, integers, objects) must be specified at the specification of the concrete service. The interface does not support any special versioning mechanism. See also XObjectOutputStream See also XObjectInputStream

Methods' Summary
getServiceName | gives the service name of the object
write | writes all the persistent data of the object to the stream.
read | reads all the persistent data of the object from the stream.

Methods' Details
getServiceName
string getServiceName(); |  |
Description gives the service name of the object Returns the service name that specifies the behavior and the persistent data format of this implementation. This name is used to create such an object by a factory during deserialization. See also ::com::sun::star::lang::XServiceInfo::getAvailableServiceNames
write
void write( | [in] XObjectOutputStream raises( | OutStream ) IOException );
Description writes all the persistent data of the object to the stream. The implementation must write the data in the order documented in the service specification. Parameter OutStream the stream, the data shall be written to. The stream supports simple types and other XPersistObject implementations.
read
void read( | [in] XObjectInputStream raises( | InStream ) IOException );
Description reads all the persistent data of the object from the stream. In case other XPersistObjects are read from the stream, the implementation uses a factory to create these objects (in general the global service manager). The implementation must read the data in the order documented at the service specification. Parameter InStream the stream, the data shall be read from.

Top of Page

Copyright © 2003 Sun Microsystems, Inc.