nsresult StringUnicharInputStream::Read(PRUnichar* aBuf, PRUint32 aOffset, PRUint32 aCount, PRUint32 *aReadCount)
nsresult UTF8InputStream::Read(PRUnichar* aBuf, PRUint32 aOffset, PRUint32 aCount, PRUint32 *aReadCount)
nsresult StringUnicharInputStream::Read(PRUnichar* aBuf,                                        PRUint32 aOffset,                                        PRUint32 aCount,                                        PRUint32 *aReadCount){  if (mPos >= mLen) {    *aReadCount = 0;    return (nsresult)-1;  }  const PRUnichar* us = mString->get();  NS_ASSERTION(mLen >= mPos, "unsigned madness");  PRUint32 amount = mLen - mPos;  if (amount > aCount) {    amount = aCount;  }  nsCRT::memcpy(aBuf, us + mPos, sizeof(PRUnichar) * amount);  mPos += amount;  *aReadCount = amount;  return NS_OK;}