GetReader() 공개 메소드

public GetReader ( ) : System.IO.StreamReader
리턴 System.IO.StreamReader
예제 #1
0
파일: Test.cs 프로젝트: emtees/old-code
 public static void  Parse(System.IO.FileInfo file)
 {
     HTMLParser parser = new HTMLParser(file);
     System.Console.Out.WriteLine("Title: " + Entities.Encode(parser.GetTitle()));
     System.Console.Out.WriteLine("Summary: " + Entities.Encode(parser.GetSummary()));
     System.IO.StreamReader reader = new System.IO.StreamReader(parser.GetReader().BaseStream, parser.GetReader().CurrentEncoding);
     for (System.String l = reader.ReadLine(); l != null; l = reader.ReadLine())
         System.Console.Out.WriteLine(l);
 }
예제 #2
0
		public static void  Parse(System.IO.FileInfo file)
		{
			System.IO.FileStream fis = null;
			try
			{
				fis = new System.IO.FileStream(file.FullName, System.IO.FileMode.Open, System.IO.FileAccess.Read);
				HTMLParser parser = new HTMLParser(fis);
				System.Console.Out.WriteLine("Title: " + Entities.Encode(parser.GetTitle()));
				System.Console.Out.WriteLine("Summary: " + Entities.Encode(parser.GetSummary()));
				System.Console.Out.WriteLine("Content:");
				System.IO.StreamReader reader = new System.IO.StreamReader(parser.GetReader().BaseStream, parser.GetReader().CurrentEncoding);
				for (System.String l = reader.ReadLine(); l != null; l = reader.ReadLine())
					System.Console.Out.WriteLine(l);
			}
			finally
			{
				if (fis != null)
					fis.Close();
			}
		}
예제 #3
0
파일: Test.cs 프로젝트: raj581/Marvin
        public static void  Parse(System.IO.FileInfo file)
        {
            HTMLParser parser = new HTMLParser(file);

            System.Console.Out.WriteLine("Title: " + Entities.Encode(parser.GetTitle()));
            System.Console.Out.WriteLine("Summary: " + Entities.Encode(parser.GetSummary()));
            System.IO.StreamReader reader = new System.IO.StreamReader(parser.GetReader().BaseStream, parser.GetReader().CurrentEncoding);
            for (System.String l = reader.ReadLine(); l != null; l = reader.ReadLine())
            {
                System.Console.Out.WriteLine(l);
            }
        }
예제 #4
0
파일: Test.cs 프로젝트: stgwilli/ravendb
 public static void  Parse(System.IO.FileInfo file)
 {
     System.IO.FileStream fis = null;
     try
     {
         fis = new System.IO.FileStream(file.FullName, System.IO.FileMode.Open, System.IO.FileAccess.Read);
         HTMLParser parser = new HTMLParser(fis);
         System.Console.Out.WriteLine("Title: " + Entities.Encode(parser.GetTitle()));
         System.Console.Out.WriteLine("Summary: " + Entities.Encode(parser.GetSummary()));
         System.Console.Out.WriteLine("Content:");
         System.IO.StreamReader reader = new System.IO.StreamReader(parser.GetReader().BaseStream, parser.GetReader().CurrentEncoding);
         for (System.String l = reader.ReadLine(); l != null; l = reader.ReadLine())
         {
             System.Console.Out.WriteLine(l);
         }
     }
     finally
     {
         if (fis != null)
         {
             fis.Close();
         }
     }
 }