PRInt32 len;
PRUint32 len;
StreamToFile::OnDataAvailable(nsIURL* aURL, nsIInputStream *pIStream,                              PRInt32 length) {  PRInt32 len;  do {    char buffer[4000];    nsresult err = pIStream->Read(buffer, 0, sizeof(buffer), &len);    if (err == NS_OK) {      if (nsnull != mFile) {        fwrite(buffer, 1, len, mFile);      }    }  } while (len > 0);  return 0;}