#include "ACEXML/common/HttpCharStream.h"#include "ace/OS_NS_stdio.h"#include "ace/OS_main.h"Include dependency graph for HttpCharStream_Test.cpp:

Go to the source code of this file.
Functions | |
| int | ACE_TMAIN (int, ACE_TCHAR *[]) |
|
||||||||||||
|
Definition at line 7 of file HttpCharStream_Test.cpp. References ACE_ERROR, ACE_TEXT, ACEXML_Char, ACEXML_HttpCharStream::close(), ACEXML_HttpCharStream::get(), LM_ERROR, ACEXML_HttpCharStream::open(), and ACE_OS::printf().
00008 {
00009 const ACEXML_Char* test = ACE_TEXT("http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd");
00010
00011 const ACEXML_Char* simple = ACE_TEXT("http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent");
00012
00013 ACEXML_HttpCharStream first;
00014 ACEXML_HttpCharStream second;
00015 ACEXML_Char ch;
00016
00017 if (first.open (test) != -1)
00018 {
00019 while (first.get (ch) != -1)
00020 ACE_OS::printf ("%c", ch);
00021 }
00022 else
00023 {
00024 first.close();
00025 ACE_ERROR ((LM_ERROR, "Error in opening stream : %m\n"));
00026 }
00027 if (second.open (simple) != -1)
00028 {
00029 while (second.get (ch) != -1)
00030 ACE_OS::printf ("%c", ch);
00031 }
00032 else
00033 {
00034 second.close();
00035 ACE_ERROR ((LM_ERROR, "Error in opening stream : %m\n"));
00036 }
00037 first.close();
00038 second.close();
00039 return 0;
00040 }
|
1.3.6