OW_NAMESPACE::HTTPChunkedIStream Class Reference

#include <OW_HTTPChunkedIStream.hpp>

Inheritance diagram for OW_NAMESPACE::HTTPChunkedIStream:

Inheritance graph
Collaboration diagram for OW_NAMESPACE::HTTPChunkedIStream:

Collaboration graph
List of all members.

Public Member Functions

 HTTPChunkedIStream (std::istream &istr)
 Convert a istream& into a HTTPChunkedIStream.
 ~HTTPChunkedIStream ()
std::istream & getInputStreamOrig ()
 Get the original istream&.
Map< String, StringgetTrailers () const
 Get the HTTP trailers from the http response.
void resetInput ()
 Clear the EOF/BAD bits, so that input can continue.
virtual void checkForError () const
 This function should be called after the end of the stream has been reached.
virtual String getTrailer (const String &key) const

Private Member Functions

void buildTrailerMap ()
 A callback function, invoked by the HTTPChunkingStreamBuffer.
 HTTPChunkedIStream (const HTTPChunkedIStream &)
HTTPChunkedIStreamoperator= (const HTTPChunkedIStream &)

Private Attributes

std::istream & m_istr
Map< String, Stringm_trailerMap


class HTTPChunkedIStreamBuffer

Detailed Description

Definition at line 75 of file OW_HTTPChunkedIStream.hpp.

Constructor & Destructor Documentation

OW_NAMESPACE::HTTPChunkedIStream::HTTPChunkedIStream std::istream &  istr  ) 

Convert a istream& into a HTTPChunkedIStream.

The istream& passed in is wrapped to that the new input available from this is de-chunked.

istr The istream& to be wrapped (de-chunked).

OW_NAMESPACE::HTTPChunkedIStream::~HTTPChunkedIStream  ) 

Definition at line 135 of file OW_HTTPChunkedIStream.cpp.

OW_NAMESPACE::HTTPChunkedIStream::HTTPChunkedIStream const HTTPChunkedIStream  )  [private]

Member Function Documentation

void OW_NAMESPACE::HTTPChunkedIStream::buildTrailerMap  )  [private]

A callback function, invoked by the HTTPChunkingStreamBuffer.

After a zero length chunk is encountered, this is called to build the trailer map, if there is one

Definition at line 147 of file OW_HTTPChunkedIStream.cpp.

References m_istr, m_trailerMap, OW_THROW, and OW_NAMESPACE::HTTPUtils::parseHeader().

Referenced by OW_NAMESPACE::HTTPChunkedIStreamBuffer::buffer_from_device().

void OW_NAMESPACE::HTTPChunkedIStream::checkForError  )  const [virtual]

This function should be called after the end of the stream has been reached.

It will check the trailers for an error, and throw an appropriate CIMException (constructed from the info from the trailers).

Reimplemented from OW_NAMESPACE::CIMProtocolIStreamIFC.

Definition at line 171 of file OW_HTTPChunkedIStream.cpp.

References OW_NAMESPACE::String::c_str(), OW_NAMESPACE::String::empty(), getTrailer(), and OW_THROW.

std::istream& OW_NAMESPACE::HTTPChunkedIStream::getInputStreamOrig  )  [inline]

Get the original istream&.

a istream& pointing to the original istream.

Definition at line 91 of file OW_HTTPChunkedIStream.hpp.

String OW_NAMESPACE::HTTPChunkedIStream::getTrailer const String key  )  const [virtual]

Definition at line 157 of file OW_HTTPChunkedIStream.cpp.

References OW_NAMESPACE::Map< Key, T, Compare >::begin(), OW_NAMESPACE::Map< Key, T, Compare >::end(), and m_trailerMap.

Referenced by checkForError().

Map<String, String> OW_NAMESPACE::HTTPChunkedIStream::getTrailers  )  const [inline]

Get the HTTP trailers from the http response.

This must be called after EOF is hit on the input stream.

the trailers.

Definition at line 97 of file OW_HTTPChunkedIStream.hpp.

HTTPChunkedIStream& OW_NAMESPACE::HTTPChunkedIStream::operator= const HTTPChunkedIStream  )  [private]

void OW_NAMESPACE::HTTPChunkedIStream::resetInput  ) 

Clear the EOF/BAD bits, so that input can continue.

Definition at line 140 of file OW_HTTPChunkedIStream.cpp.

References OW_NAMESPACE::HTTPChunkedIStreamBase::m_strbuf, and OW_NAMESPACE::HTTPChunkedIStreamBuffer::resetInput().

Friends And Related Function Documentation

friend class HTTPChunkedIStreamBuffer [friend]

Definition at line 129 of file OW_HTTPChunkedIStream.hpp.

Member Data Documentation

std::istream& OW_NAMESPACE::HTTPChunkedIStream::m_istr [private]

Definition at line 106 of file OW_HTTPChunkedIStream.hpp.

Referenced by buildTrailerMap().

Map<String, String> OW_NAMESPACE::HTTPChunkedIStream::m_trailerMap [private]

Definition at line 114 of file OW_HTTPChunkedIStream.hpp.

Referenced by buildTrailerMap(), and getTrailer().

The documentation for this class was generated from the following files:
Generated on Thu Feb 9 09:15:02 2006 for openwbem by  doxygen 1.4.6