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

HttpCharStream_Test.cpp File Reference

#include "ACEXML/common/HttpCharStream.h"

Include dependency graph for HttpCharStream_Test.cpp:

Include dependency graph

Go to the source code of this file.

Functions

int ACE_TMAIN (int, ACE_TCHAR *[])


Function Documentation

int ACE_TMAIN int   ,
ACE_TCHAR  []
 

Definition at line 5 of file HttpCharStream_Test.cpp.

References ACE_ERROR, ACE_TCHAR, ACE_TEXT, ACEXML_Char, ACEXML_HttpCharStream::close, ACEXML_HttpCharStream::get, LM_ERROR, ACEXML_HttpCharStream::open, and ACE_OS::printf.

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:24:46 2003 for ACEXML by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002