Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

HttpCharStream_Test.cpp

Go to the documentation of this file.
00001 // $Id: HttpCharStream_Test.cpp,v 1.1.1.1 2003/02/21 18:36:32 chad Exp $
00002 
00003 #include "ACEXML/common/HttpCharStream.h"
00004 
00005 int ACE_TMAIN (int, ACE_TCHAR *[])
00006 {
00007   const ACEXML_Char* test = ACE_TEXT("http://www.cs.wustl.edu/~nanbor/");
00008 
00009   const ACEXML_Char* simple = ACE_TEXT("http://www.cs.wustl.edu/~kitty/");
00010 
00011   ACEXML_HttpCharStream stream;
00012   ACEXML_Char ch;
00013 
00014   if (stream.open (test) != -1)
00015     {
00016       while (stream.get (ch) != -1)
00017         ACE_OS::printf ("%c", ch);
00018       stream.close();
00019     }
00020   else
00021     {
00022       ACE_ERROR ((LM_ERROR, "Error in opening stream : %m\n"));
00023     }
00024 
00025   if (stream.open (simple) != -1)
00026     {
00027       while (stream.get (ch) != -1)
00028         ACE_OS::printf ("%c", ch);
00029     }
00030   else
00031     {
00032       ACE_ERROR ((LM_ERROR, "Error in opening stream : %m\n"));
00033     }
00034   return 0;
00035 }

Generated on Mon Jun 16 13:23:22 2003 for ACEXML by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002