ACEXML
6.1.0
|
#include <HttpCharStream.h>
Public Member Functions | |
ACEXML_HttpCharStream (void) | |
Default constructor. | |
virtual | ~ACEXML_HttpCharStream (void) |
Destructor. | |
int | open (const ACEXML_Char *url) |
Open an URL. | |
virtual int | available (void) |
virtual int | close (void) |
virtual int | get (ACEXML_Char &ch) |
virtual int | read (ACEXML_Char *str, size_t len) |
virtual int | peek (void) |
virtual void | rewind (void) |
virtual int | determine_encoding (void) |
virtual const ACEXML_Char * | getEncoding (void) |
virtual const ACEXML_Char * | getSystemId (void) |
Private Member Functions | |
int | send_request (void) |
int | get_url (size_t &len) |
Private Attributes | |
ACEXML_Char * | url_ |
ACEXML_URL_Addr * | url_addr_ |
ACEXML_Mem_Map_Stream * | stream_ |
Connector * | connector_ |
ACE_OFF_T | size_ |
ACE_OFF_T | data_offset_ |
ACEXML_Char * | encoding_ |
An implementation of ACEXML_CharStream for reading input from a URL.
ACEXML_HttpCharStream::ACEXML_HttpCharStream | ( | void | ) |
Default constructor.
ACEXML_HttpCharStream::~ACEXML_HttpCharStream | ( | void | ) | [virtual] |
Destructor.
int ACEXML_HttpCharStream::available | ( | void | ) | [virtual] |
Returns the available ACEXML_Char in the buffer. -1 if the object is not initialized properly.
Implements ACEXML_CharStream.
int ACEXML_HttpCharStream::close | ( | void | ) | [virtual] |
Close this stream and release all resources used by it.
Implements ACEXML_CharStream.
int ACEXML_HttpCharStream::determine_encoding | ( | void | ) | [virtual] |
Determine the encoding of the file.
int ACEXML_HttpCharStream::get | ( | ACEXML_Char & | ch | ) | [virtual] |
Read the next ACEXML_Char. Return -1 if we are not able to return an ACEXML_Char, 0 if EOS is reached, or 1 if succeed.
Implements ACEXML_CharStream.
int ACEXML_HttpCharStream::get_url | ( | size_t & | len | ) | [private] |
Fetch the URL and save it in backing store.
const ACEXML_Char * ACEXML_HttpCharStream::getEncoding | ( | void | ) | [virtual] |
Get the encoding of the file
Implements ACEXML_CharStream.
const ACEXML_Char * ACEXML_HttpCharStream::getSystemId | ( | void | ) | [virtual] |
Implements ACEXML_CharStream.
int ACEXML_HttpCharStream::open | ( | const ACEXML_Char * | url | ) |
Open an URL.
int ACEXML_HttpCharStream::peek | ( | void | ) | [virtual] |
Peek the next ACEXML_Char in the CharStream. Return the character if succeess, -1 if EOS is reached.
Implements ACEXML_CharStream.
int ACEXML_HttpCharStream::read | ( | ACEXML_Char * | str, |
size_t | len | ||
) | [virtual] |
Read the next batch of ACEXML_Char strings
Implements ACEXML_CharStream.
void ACEXML_HttpCharStream::rewind | ( | void | ) | [virtual] |
Resets the file pointer to the beginning of the stream.
Implements ACEXML_CharStream.
int ACEXML_HttpCharStream::send_request | ( | void | ) | [private] |
Send a HTTP/1.1 request to fetch the contents of the URL.
Connector* ACEXML_HttpCharStream::connector_ [private] |
ACE_OFF_T ACEXML_HttpCharStream::data_offset_ [private] |
ACEXML_Char* ACEXML_HttpCharStream::encoding_ [private] |
ACE_OFF_T ACEXML_HttpCharStream::size_ [private] |
ACEXML_Char* ACEXML_HttpCharStream::url_ [private] |
ACEXML_URL_Addr* ACEXML_HttpCharStream::url_addr_ [private] |