WARNING: Most of this content (with the exception of the Mozilla 1.9 XPCOM reference) is very old, and can be expected to be out of date and possibly obsolete. For better XUL documentation, please visit the XUL hub at the Mozilla Developer Center.

nsIUnicharStreamLoader

IID:9037f476-7c08-4729-b690-3e425269802b
Inherits From:nsIStreamListener

This interface is implemented by the following components:


Constants

Asynchronously load a channel, converting the data to UTF-16.

To use this interface, first call init() with a nsIUnicharStreamLoaderObserver that will be notified when the data has been loaded. Then call asyncOpen() on the channel with the nsIUnicharStreamLoader as the listener. The context argument in the asyncOpen() call will be passed to the onStreamComplete() callback.

PRUint32 DEFAULT_SEGMENT_SIZE = 4096

Properties

readonly nsIChannel channel

The channel attribute is only valid inside the onDetermineCharset and onStreamComplete callbacks. Otherwise it will be null.

readonly ACString charset

The charset that onDetermineCharset returned, if that's been called.


Methods

void init ( nsIUnicharStreamLoaderObserver observer , PRUint32 segmentSize )

void init ( nsIUnicharStreamLoaderObserver observer , PRUint32 segmentSize )

Initializes the unichar stream loader

Arguments:
observer: the observer to notify when a charset is needed and when the load is complete
segmentSize: the size of the segments to use for the data, in bytes

References

This interface is passed as an argument to the following methods:

nsIUnicharStreamLoaderObserver.onDetermineCharset, nsIUnicharStreamLoaderObserver.onStreamComplete

Reference documentation is generated from Mozilla's source.