mLastError = rv;
    NS_IMETHOD WriteSegments(nsReadSegmentFun aReader, void *aClosure,                            PRUint32 aCount, PRUint32 *aBytesWritten) {        nsresult rv = mSink->WriteSegments(aReader, aClosure, aCount, aBytesWritten);        if (NS_SUCCEEDED(rv))            mBytesWritten += *aBytesWritten;        return rv;    }