Struct xpcom::interfaces::nsIConverterInputStream [] [src]

#[repr(C)]
pub struct nsIConverterInputStream { /* fields omitted */ }

interface nsIConverterInputStream : nsIUnicharInputStream

/**
 * 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.
 */

Methods

impl nsIConverterInputStream
[src]

[src]

Cast this nsIConverterInputStream to one of its base interfaces.

impl nsIConverterInputStream
[src]

DEFAULT_REPLACEMENT_CHARACTER: i64 = 65533
/**
     * Default replacement char value, U+FFFD REPLACEMENT CHARACTER.
     */

[src]

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

void init (in nsIInputStream aStream, in string aCharset, in long aBufferSize, in char16_t aReplacementChar);

Methods from Deref<Target = nsIUnicharInputStream>

[src]

Cast this nsIUnicharInputStream to one of its base interfaces.

[src]

/**
 * Abstract unicode character input stream
 * @see nsIInputStream
 */
/**
   * Reads into a caller-provided character array.
   *
   * @return 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.
   *
   * @note To read more than 2^32 characters, call this method multiple times.
   */

[noscript] unsigned long read ([array, size_is (aCount)] in char16_t aBuf, in unsigned long aCount);

[src]

/**
   * Read into a string object.
   * @param aCount The number of characters that should be read
   * @return The number of characters that were read.
   */

unsigned long readString (in unsigned long aCount, out AString aString);

[src]

/**
  * Close the stream and free associated resources. This also closes the
  * underlying stream, if any.
  */

void close ();

Trait Implementations

impl XpCom for nsIConverterInputStream
[src]

IID: nsIID = nsID(4234608566, 21508, 18696, [164, 163, 39, 249, 47, 160, 87, 157])

[src]

Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more

impl RefCounted for nsIConverterInputStream
[src]

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsIConverterInputStream
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.