//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void testURLs() throws Exception
        public virtual void testURLs()
        {
            Reader reader = null;
            string randomTextWithURLs;

            try
            {
                reader = new System.IO.StreamReader(this.GetType().getResourceAsStream("random.text.with.urls.txt"), Encoding.UTF8);
                StringBuilder builder = new StringBuilder();
                char[]        buffer  = new char[1024];
                int           numCharsRead;
                while (-1 != (numCharsRead = reader.read(buffer)))
                {
                    builder.Append(buffer, 0, numCharsRead);
                }
                randomTextWithURLs = builder.ToString();
            }
            finally
            {
                if (null != reader)
                {
                    reader.close();
                }
            }
            assertTrue(null != randomTextWithURLs && randomTextWithURLs.Length > 0);
            System.IO.StreamReader bufferedReader = null;
            string[] urls;
            try
            {
                IList <string> urlList = new List <string>();
                bufferedReader = new System.IO.StreamReader(this.GetType().getResourceAsStream("urls.from.random.text.with.urls.txt"), Encoding.UTF8);
                string line;
                while (null != (line = bufferedReader.ReadLine()))
                {
                    line = line.Trim();
                    if (line.Length > 0)
                    {
                        urlList.Add(line);
                    }
                }
                urls = urlList.ToArray();
            }
            finally
            {
                if (null != bufferedReader)
                {
                    bufferedReader.Close();
                }
            }
            assertTrue(null != urls && urls.Length > 0);
            BaseTokenStreamTestCase.assertAnalyzesTo(urlAnalyzer, randomTextWithURLs, urls);
        }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void testURLs() throws Exception
	  public virtual void testURLs()
	  {
		Reader reader = null;
		string randomTextWithURLs;
		try
		{
		  reader = new System.IO.StreamReader(this.GetType().getResourceAsStream("random.text.with.urls.txt"), Encoding.UTF8);
		  StringBuilder builder = new StringBuilder();
		  char[] buffer = new char[1024];
		  int numCharsRead;
		  while (-1 != (numCharsRead = reader.read(buffer)))
		  {
			builder.Append(buffer, 0, numCharsRead);
		  }
		  randomTextWithURLs = builder.ToString();
		}
		finally
		{
		  if (null != reader)
		  {
			reader.close();
		  }
		}
		assertTrue(null != randomTextWithURLs && randomTextWithURLs.Length > 0);
		System.IO.StreamReader bufferedReader = null;
		string[] urls;
		try
		{
		  IList<string> urlList = new List<string>();
		  bufferedReader = new System.IO.StreamReader(this.GetType().getResourceAsStream("urls.from.random.text.with.urls.txt"), Encoding.UTF8);
		  string line;
		  while (null != (line = bufferedReader.ReadLine()))
		  {
			line = line.Trim();
			if (line.Length > 0)
			{
			  urlList.Add(line);
			}
		  }
		  urls = urlList.ToArray();
		}
		finally
		{
		  if (null != bufferedReader)
		  {
			bufferedReader.Close();
		  }
		}
		assertTrue(null != urls && urls.Length > 0);
		BaseTokenStreamTestCase.assertAnalyzesTo(urlAnalyzer, randomTextWithURLs, urls);
	  }