NS_IMETHOD                      Read(char* aBuf, PRUint32 aCount, PRUint32 *aReadCount) { NS_PRECONDITION(aBuf != nsnull, "null ptr"); if (!aBuf) return NS_ERROR_NULL_POINTER; NS_PRECONDITION(aReadCount != nsnull, "null ptr"); if (!aReadCount) return NS_ERROR_NULL_POINTER; if (!mFileDesc) return NS_FILE_RESULT(PR_BAD_DESCRIPTOR_ERROR); if (mFailed) return NS_ERROR_FAILURE; PRInt32 bytesRead = PR_Read(mFileDesc, aBuf, aCount); if (bytesRead < 0) { *aReadCount = 0; mFailed = PR_TRUE; return NS_FILE_RESULT(PR_GetError()); } else if (bytesRead == 0) { mEOF = PR_TRUE; } *aReadCount = bytesRead; return NS_OK; }
NS_IMETHODIMP FileImpl::Read(char* aBuf, PRUint32 aCount, PRUint32 *aReadCount)  { NS_PRECONDITION(aBuf != nsnull, "null ptr"); if (!aBuf) return NS_ERROR_NULL_POINTER; NS_PRECONDITION(aReadCount != nsnull, "null ptr"); if (!aReadCount) return NS_ERROR_NULL_POINTER; if (!mFileDesc) return NS_FILE_RESULT(PR_BAD_DESCRIPTOR_ERROR); if (mFailed) return NS_ERROR_FAILURE; PRInt32 bytesRead = PR_Read(mFileDesc, aBuf, aCount); if (bytesRead < 0) { *aReadCount = 0; mFailed = PR_TRUE; return NS_FILE_RESULT(PR_GetError()); } else if (bytesRead == 0) { mEOF = PR_TRUE; } *aReadCount = bytesRead; return NS_OK; }
		NS_IMETHOD                      Read(char* aBuf,			                                PRUint32 aCount,					                        PRUint32 *aReadCount)								        {								            NS_PRECONDITION(aBuf != nsnull, "null ptr");								            if (!aBuf)								                return NS_ERROR_NULL_POINTER;								            NS_PRECONDITION(aReadCount != nsnull, "null ptr");								            if (!aReadCount)								                return NS_ERROR_NULL_POINTER;								            if (!mFileDesc)								                return NS_FILE_RESULT(PR_BAD_DESCRIPTOR_ERROR);								            if (mFailed)								                return NS_ERROR_FAILURE;								            PRInt32 bytesRead = PR_Read(mFileDesc, aBuf, aCount);								            if (bytesRead < 0)								            {								                *aReadCount = 0;								                mFailed = PR_TRUE;								                return NS_FILE_RESULT(PR_GetError());								            }                                            else if (bytesRead == 0) {                                                mEOF = PR_TRUE;                                            }								            *aReadCount = bytesRead;								            return NS_OK;								        }