Interface nsIConverterOutputStreamType

This interface allows writing strings to a stream, doing automatic character encoding conversion.

Hierarchy

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • Close the stream and free associated resources. This also closes the underlying stream.

    Returns void

  • Flush the stream. This finishes the conversion and writes any bytes that finish the current byte sequence.

    It does NOT flush the underlying stream.

    Returns void

  • 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.

    Parameters

    • aOutStream: nsIOutputStream

      The underlying output stream to which the converted strings will be written.

    • aCharset: string

      The character set to use for encoding the characters. A null charset will be interpreted as UTF-8.

    Returns void

  • Write a single character to the stream. When writing many characters, prefer the string-taking write method.

    Retval

    true The character was written successfully

    Retval

    false Not all bytes of the character could be written.

    Parameters

    • aCount: number
    • c: char16_t

    Returns boolean

  • Write a string to the stream.

    Retval

    true The string was written successfully

    Retval

    false Not all bytes of the string could be written.

    Parameters

    • str: string

    Returns boolean

Generated using TypeDoc