nsIObjectOutputStream

IID:92c898ac-5fde-4b99-87b3-5d486422094b
Inherits From:nsIBinaryOutputStream

Methods

[notxpcom] charPtr* getBuffer ( PRUint32 length , PRUint32 alignMask ) [notxpcom] void putBuffer ( charPtr* buffer , PRUint32 length ) void writeCompoundObject ( nsISupports object , nsIIDRef IID , PRBool isStrongRef ) void writeID ( nsIDRef ID ) void writeObject ( nsISupports object , PRBool isStrongRef ) void writeSingleRefObject ( nsISupports object )

[notxpcom] charPtr* getBuffer ( PRUint32 length , PRUint32 alignMask )

Optimized serialization support -- see nsIStreamBufferAccess.idl.

Arguments:
length
alignMask

[notxpcom] void putBuffer ( charPtr* buffer , PRUint32 length )

Arguments:
buffer
length

void writeCompoundObject ( nsISupports object , nsIIDRef IID , PRBool isStrongRef )

Write the object referenced by an interface pointer at object that inherits from a non-primary nsISupports, i.e., a reference to one of the multiply inherited interfaces derived from an nsISupports other than the root or XPCOM-identity nsISupports; or a reference to an inner object in the case of true XPCOM aggregation. iID identifies this interface.

Arguments:
object
IID
isStrongRef

void writeID ( nsIDRef ID )

Arguments:
ID

void writeObject ( nsISupports object , PRBool isStrongRef )

Write the object whose "root" or XPCOM-identity nsISupports is object. The cause for writing this object is a strong or weak reference, so the isStrongRef argument must tell which kind of pointer is being followed here during serialization.

If the object has only one strong reference in the serialization and no weak refs, use writeSingleRefObject. This is a valuable optimization: it saves space in the stream, and cycles on both ends of the process.

If the reference being serialized is a pointer to an interface not on the primary inheritance chain ending in the root nsISupports, you must call writeCompoundObject instead of this method.

Arguments:
object
isStrongRef

void writeSingleRefObject ( nsISupports object )

Write an object referenced singly and strongly via its root nsISupports or a subclass of its root nsISupports. There must not be other refs to object in memory, or in the serialization.

Arguments:
object

References

This interface is the type of the following properties:

nsIFastLoadService.outputStream

This interface is passed as an argument to the following methods:

nsIFastLoadService.cacheChecksum, nsIFastLoadService.writeFastLoadPtr, nsISerializable.write

This interface is returned from the following methods:

nsIFastLoadService.newOutputStream

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com