Implemented by
@See nsIObjectInputStream @See nsIBinaryOutputStream
[scriptable, uuid(92c898ac-5fde-4b99-87b3-5d486422094b)]
interface nsIObjectOutputStream : nsIBinaryOutputStream
Methods
Optimized serialization support -- see nsIStreamBufferAccess.idl.
[notxpcom]
charPtr
getBuffer(in PRUint32 aLength, in PRUint32 aAlignMask)
[notxpcom]
void
putBuffer(in charPtr aBuffer, in PRUint32 aLength)
Write the object referenced by an interface pointer at aObject 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. aIID identifies this interface.
void
writeCompoundObject(in nsISupports aObject, in nsIIDRef aIID, in PRBool aIsStrongRef)
void
writeID(in nsIDRef aID)
Write the object whose "root" or XPCOM-identity nsISupports is aObject. The cause for writing this object is a strong or weak reference, so the aIsStrongRef 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.
void
writeObject(in nsISupports aObject, in PRBool aIsStrongRef)
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 aObject in memory, or in the serialization.
void
writeSingleRefObject(in nsISupports aObject)
Compare to: