Optional
aInstancePtr: objectA run time mechanism for interface discovery.
NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.
aInstancePtr must not be null.
[in] A requested interface IID
[out] A pointer to an interface pointer to receive the result.
Initialize this stream.
The underlying stream to read from.
The character encoding to use for converting the bytes of the stream. A null charset will be interpreted as UTF-8.
How many bytes to buffer.
The character to replace unknown byte sequences in the stream with. The standard replacement character is U+FFFD. A value of 0x0000 will cause an exception to be thrown if unknown byte sequences are encountered in the stream.
Reads into a caller-provided array.
The number of utf-16 code units 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.
To read more than 2^32 code units, call this method multiple times.
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 UTF-16 code units to consume.
number of UTF-16 code units read (may be less than aCount)
0 if reached end of file (or if aWriter refused to consume data)
NS_BASE_STREAM_WOULD_BLOCK if reading from the input stream would block the calling thread (non-blocking mode only)
NOTE: this function may be unimplemented if a stream has no underlying buffer
the "consumer" of the data to be read
opaque parameter passed to writer
the maximum number of UTF-16 code units to be read
Generated using TypeDoc
A unichar input stream that wraps an input stream. This allows reading unicode strings from a stream, automatically converting the bytes from a selected character encoding.