void close ( )
[noscript] PRUint32 read ( arrayof PRUnichar buf , PRUint32 count )
[noscript] PRUint32 readSegments ( nsWriteUnicharSegmentFun writer , voidPtr* closure , PRUint32 count )
PRUint32 readString ( PRUint32 count , out AString string )
Close the stream and free associated resources. This also closes the underlying stream, if any.
Reads into a caller-provided character array.
- The number of characters that were successfully read. May be less than aCount, even if there is more data in the input stream. A return value of 0 means EOF.
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 characters to consume.
NOTE: this function may be unimplemented if a stream has no underlying buffer
- writer: the "consumer" of the data to be read
- closure: opaque parameter passed to writer
- count: the maximum number of characters to be read
- 0 if reached end of file (or if aWriter refused to consume data)
Read into a string object.
- count: The number of characters that should be read
- The number of characters that were read.
This interface is passed as an argument to the following methods:
Reference documentation is generated from Mozilla's source.