Public Member Functions | Public Attributes

nsIConverterInputStream Interface Reference

A unichar input stream that wraps an input stream. More...

import "nsIConverterInputStream.idl";

Inheritance diagram for nsIConverterInputStream:
Collaboration diagram for nsIConverterInputStream:

List of all members.

Public Member Functions

void init (in nsIInputStream aStream, in string aCharset, in long aBufferSize, in PRUnichar aReplacementChar)
 Initialize this stream.

Public Attributes

const PRUnichar DEFAULT_REPLACEMENT_CHARACTER = 0xFFFD
 Default replacement char value, U+FFFD REPLACEMENT CHARACTER.

Detailed Description

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.


Member Function Documentation

void nsIConverterInputStream::init ( in nsIInputStream  aStream,
in string  aCharset,
in long  aBufferSize,
in PRUnichar  aReplacementChar 
)

Initialize this stream.

Parameters:
aStream The underlying stream to read from.
aCharset The character encoding to use for converting the bytes of the stream. A null charset will be interpreted as UTF-8.
aBufferSize How many bytes to buffer.
aReplacementChar 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.

Member Data Documentation

Default replacement char value, U+FFFD REPLACEMENT CHARACTER.


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