Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions
nsIObjectInputStream Interface Reference

import "nsIObjectInputStream.idl";

Inheritance diagram for nsIObjectInputStream:
Inheritance graph
[legend]
Collaboration diagram for nsIObjectInputStream:
Collaboration graph
[legend]

List of all members.

Public Member Functions

nsISupports readObject (in PRBool aIsStrongRef)
 Read an object from this stream to satisfy a strong or weak reference to one of its interfaces.
nsresult readID (out nsID aID)
charPtr getBuffer (in PRUint32 aLength, in PRUint32 aAlignMask)
 Optimized deserialization support -- see nsIStreamBufferAccess.idl.
void putBuffer (in charPtr aBuffer, in PRUint32 aLength)
void setInputStream (in nsIInputStream aInputStream)
PRBool readBoolean ()
PRUint8 read8 ()
PRUint16 read16 ()
PRUint32 read32 ()
PRUint64 read64 ()
float readFloat ()
double readDouble ()
ACString readCString ()
 Read a NUL-terminated 8-bit char* string from a binary stream.
AString readString ()
 Read a NUL-terminated 16-bit PRUnichar* string from a binary stream.
void readBytes (in PRUint32 aLength,[size_is(aLength), retval] out string aString)
 Read an opaque byte array from a binary stream.
void readByteArray (in PRUint32 aLength,[array, size_is(aLength), retval] out PRUint8 aBytes)
 Read an opaque byte array from a binary stream, storing the results as an array of PRUint8s.
void close ()
 Close the stream.
unsigned long available ()
unsigned long read (in charPtr aBuf, in unsigned long aCount)
 Read data from the stream.
unsigned long readSegments (in nsWriteSegmentFun aWriter, in voidPtr aClosure, in unsigned long aCount)
 Low-level read method that has access to the stream's underlying buffer.
boolean isNonBlocking ()

Detailed Description

See also:
nsIObjectOutputStream
nsIBinaryInputStream

Definition at line 48 of file nsIObjectInputStream.idl.


Member Function Documentation

unsigned long nsIInputStream::available ( ) [inherited]
Returns:
number of bytes currently available in the stream
void nsIInputStream::close ( ) [inherited]

Close the stream.

charPtr nsIObjectInputStream::getBuffer ( in PRUint32  aLength,
in PRUint32  aAlignMask 
)

Optimized deserialization support -- see nsIStreamBufferAccess.idl.

Returns:
true if stream is non-blocking
void nsIObjectInputStream::putBuffer ( in charPtr  aBuffer,
in PRUint32  aLength 
)
unsigned long nsIInputStream::read ( in charPtr  aBuf,
in unsigned long  aCount 
) [inherited]

Read data from the stream.

Parameters:
aBufthe buffer into which the data is to be read
aCountthe maximum number of bytes to be read
Returns:
number of bytes read (may be less than aCount).
0 if reached end of file
Exceptions:
NS_BASE_STREAM_WOULD_BLOCKif reading from the input stream would block the calling thread (non-blocking mode only)
<other-error>on failure
void nsIBinaryInputStream::readByteArray ( in PRUint32  aLength,
[array, size_is(aLength), retval] out PRUint8  aBytes 
) [inherited]

Read an opaque byte array from a binary stream, storing the results as an array of PRUint8s.

void nsIBinaryInputStream::readBytes ( in PRUint32  aLength,
[size_is(aLength), retval] out string  aString 
) [inherited]

Read an opaque byte array from a binary stream.

ACString nsIBinaryInputStream::readCString ( ) [inherited]

Read a NUL-terminated 8-bit char* string from a binary stream.

double nsIBinaryInputStream::readDouble ( ) [inherited]
float nsIBinaryInputStream::readFloat ( ) [inherited]
nsISupports nsIObjectInputStream::readObject ( in PRBool  aIsStrongRef)

Read an object from this stream to satisfy a strong or weak reference to one of its interfaces.

If the interface was not along the primary inheritance chain ending in the "root" or XPCOM-identity nsISupports, readObject will QueryInterface from the deserialized object root to the correct interface, which was specified when the object was serialized.

See also:
nsIObjectOutputStream
unsigned long nsIInputStream::readSegments ( in nsWriteSegmentFun  aWriter,
in voidPtr  aClosure,
in unsigned long  aCount 
) [inherited]

Low-level read method that has access to the stream's underlying buffer.

The writer function may be called multiple times for segmented buffers. ReadSegments is expected to keep calling the writer until either there is nothing left to read or the writer returns an error. ReadSegments should not call the writer with zero bytes to consume.

Parameters:
aWriterthe "consumer" of the data to be read
aClosureopaque parameter passed to writer
aCountthe maximum number of bytes to be read
Returns:
number of bytes read (may be less than aCount)
0 if reached end of file (or if aWriter refused to consume data)
Exceptions:
NS_BASE_STREAM_WOULD_BLOCKif reading from the input stream would block the calling thread (non-blocking mode only)
<other-error>on failure

NOTE: this function may be unimplemented if a stream has no underlying buffer (e.g., socket input stream).

AString nsIBinaryInputStream::readString ( ) [inherited]

Read a NUL-terminated 16-bit PRUnichar* string from a binary stream.


The documentation for this interface was generated from the following file: