Method overview

void onDataAvailable(in nsIRequest aRequest, in nsISupports aContext, in nsIInputStream aInputStream, in unsigned long aOffset, in unsigned long aCount);

Methods

onDataAvailable()

This method is called when the next chunk of data for the ongoing request may be read without blocking the calling thread. The data can be read from the nsIInputStream object passed as the argument to this method.

Note: Your implementation of this method must read exactly aCount bytes of data before returning.

void onDataAvailable(
in nsIRequest aRequest,
in nsISupports aContext,
in nsIInputStream aInputStream,
in unsigned long aOffset,
in unsigned long aCount
);

Parameters

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

aCount

The number of bytes available for reading. You must read all of these bytes before returning to the caller.