bool nsImportScanFile::Scan(bool *pDone)
{
  uint64_t available;
  nsresult rv = m_pInputStream->Available(&available);
  if (NS_FAILED(rv))
        {
    if (m_pos < m_bytesInBuf)
      ScanBuffer(pDone);
    *pDone = true;
    return true;
  }

  // Fill up a buffer and scan it
  if (!FillBufferFromFile())
    return false;

  return ScanBuffer(pDone);
}
PRBool nsImportScanFile::Scan( PRBool *pDone)
{
  PRUint32 available;
  nsresult rv = m_pInputStream->Available( &available);
  if (NS_FAILED(rv))
        {
    if (m_pos < m_bytesInBuf)
      ScanBuffer( pDone);
    *pDone = PR_TRUE;
    return( PR_TRUE);
  }

  // Fill up a buffer and scan it
  if (!FillBufferFromFile())
    return( PR_FALSE);

  return( ScanBuffer( pDone));
}