We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS


This interface allows writing strings to a stream, doing automatic character encoding conversion.
Gecko 1.8
Inherits from: nsIUnicharOutputStream Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0)

Implemented by: @mozilla.org/intl/converter-output-stream;1. To create an instance, use:

var converterOutputStream = Components.classes["@mozilla.org/intl/converter-output-stream;1"]

Method overview

void init(in nsIOutputStream aOutStream, in string aCharset, in unsigned long aBufferSize, in PRUnichar aReplacementCharacter);



Initialize this stream. Must be called before any other method on this interface, or you will crash. The output stream passed to this method must not be null, or you will crash.

void init(
  in nsIOutputStream aOutStream,
  in string aCharset,
  in unsigned long aBufferSize,
  in PRUnichar aReplacementCharacter
The underlying output stream to which the converted strings will be written.
The character set to use for encoding the characters. A null charset will be interpreted as UTF-8.
How many bytes to buffer. A value of 0 means that no bytes will be buffered. Implementations not supporting buffering may ignore this parameter.
The replacement character to use when an unsupported character is found. A value of 0x0000 will cause an exception to be thrown upon attempts to write unsupported characters.
Exceptions thrown
If aReplacementCharacter is not encodable in the selected character encoding and an attempt is made to write the character.

See also

Document Tags and Contributors

Contributors to this page: Sheppy, JacobBramley, trevorh
Last updated by: Sheppy,