return mStreamConverter->OnDataAvailable(request, ctxt, inStr, sourceOffset, count);
mPluginStreamInfo->SetRequest(request);  const char * url = nsnull; mPluginStreamInfo->GetURL(&url);  PLUGIN_LOG(PLUGIN_LOG_NOISY, ("nsPluginStreamListenerPeer::OnDataAvailable this=%p request=%p, offset=%d, length=%d, url=%s\n", this, request, sourceOffset, aLength, url ? url : "no url set"));    if(mStreamType != nsPluginStreamType_AsFileOnly) {  nsCOMPtr<nsIByteRangeRequest> brr = do_QueryInterface(request); if (brr) { if (!mDataForwardToRequest) return NS_ERROR_FAILURE;  PRInt64 absoluteOffset64 = LL_ZERO; brr->GetStartRange(&absoluteOffset64);   PRInt32 absoluteOffset = (PRInt32)nsInt64(absoluteOffset64);         nsPRUintKey key(absoluteOffset); PRInt32 amtForwardToPlugin = NS_PTR_TO_INT32(mDataForwardToRequest->Get(&key)); mDataForwardToRequest->Put(&key, NS_INT32_TO_PTR(amtForwardToPlugin + aLength));  mPluginStreamInfo->SetStreamOffset(absoluteOffset + amtForwardToPlugin); }  nsCOMPtr<nsIInputStream> stream = aIStream;      if (mFileCacheOutputStream) { rv = NS_NewInputStreamTee(getter_AddRefs(stream), aIStream, mFileCacheOutputStream); if (NS_FAILED(rv)) return rv; }  rv =  mPStreamListener->OnDataAvailable(mPluginStreamInfo, stream, aLength);    if (NS_FAILED(rv)) request->Cancel(rv); } else {  char* buffer = new char[aLength]; PRUint32 amountRead, amountWrote = 0; rv = aIStream->Read(buffer, aLength, &amountRead);   if (mFileCacheOutputStream) { while (amountWrote < amountRead && NS_SUCCEEDED(rv)) { rv = mFileCacheOutputStream->Write(buffer, amountRead, &amountWrote); } } delete [] buffer; } return rv;
nsPluginByteRangeStreamListener::OnDataAvailable(nsIRequest *request, nsISupports *ctxt,                                nsIInputStream *inStr, PRUint32 sourceOffset, PRUint32 count){  if (!mStreamConverter)    return NS_ERROR_FAILURE;  nsCOMPtr<nsIStreamListener> finalStreamListener = do_QueryReferent(mWeakPtrPluginStreamListenerPeer);  if (!finalStreamListener)    return NS_ERROR_FAILURE;  return mStreamConverter->OnDataAvailable(request, ctxt, inStr, sourceOffset, count);}