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.

nsIStreamListener

IID:1a637020-1482-11d3-9333-00104ba0fd40
Inherits From:nsIRequestObserver
Status:FROZEN

This interface is implemented by the following components:


Methods

void onDataAvailable ( nsIRequest request , nsISupports context , nsIInputStream inputStream , PRUint32 offset , PRUint32 count )

void onDataAvailable ( nsIRequest request , nsISupports context , nsIInputStream inputStream , PRUint32 offset , PRUint32 count )

Called when the next chunk of data (corresponding to the request) may be read without blocking the calling thread. The onDataAvailable impl must read exactly count bytes of data before returning.

NOTE: The inputStream parameter must implement readSegments.

An exception thrown from onDataAvailable has the side-effect of causing the request to be canceled.

Arguments:
request: request corresponding to the source of the data
context: user defined context
inputStream: input stream containing the data chunk
offset: Number of bytes that were sent in previous onDataAvailable calls for this request. In other words, the sum of all previous count parameters. If that number is greater than or equal to 2^32, this parameter will be PR_UINT32_MAX (2^32 - 1).
count: number of bytes available in the stream

References

This interface is the type of the following properties:

nsIMailboxUrl.mailboxCopyHandler, nsIMailboxUrl.mailboxParser

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

imgILoader.loadImageWithChannel, nsIChannel.asyncOpen, nsIDocumentLoaderFactory.createInstance, nsIImapMockChannel.GetChannelListener, nsIInputStreamPump.asyncRead, nsIMailboxService.ParseMailbox, nsIMimeEmitter.SetOutputListener, nsIMsgMessageService.CopyMessage, nsIMsgMessageService.CopyMessages, nsIPluginDocument.setStreamListener, nsIStreamConverter.asyncConvertData, nsIStreamConverterService.asyncConvertData, nsIStreamListenerTee.init, nsIURIContentListener.doContent

This interface is returned from the following methods:

nsIExternalHelperAppService.doContent, nsIImageLoadingContent.loadImageWithChannel, nsIMimeEmitter.GetOutputListener, nsIMsgMailNewsUrl.getSaveAsListener, nsIPluginHost.instantiatePluginForChannel, nsIRDFXMLParser.parseAsync, nsIStreamConverterService.asyncConvertData, nsIURILoader.openChannel

Reference documentation is generated from Mozilla's source.