OW_NAMESPACE::HTTPChunkedOStream Class Reference

#include <OW_HTTPChunkedOStream.hpp>

Inheritance diagram for OW_NAMESPACE::HTTPChunkedOStream:

Inheritance graph
Collaboration diagram for OW_NAMESPACE::HTTPChunkedOStream:

Collaboration graph
List of all members.

Public Types


Public Member Functions

 HTTPChunkedOStream (std::ostream &ostr)
 Convert a ostream to a HTTPChunkedOStream.
 ~HTTPChunkedOStream ()
void termOutput (ESendLastChunkFlag sendLastChunk=E_SEND_LAST_CHUNK)
 Call this when the entity has been completely sent.
std::ostream & getOutputStreamOrig ()
 Get the original ostream&.
void addTrailer (const String &key, const String &value)
 Add a HTTP trailer (header at the end of a chunked entity).

Private Member Functions

 HTTPChunkedOStream (const HTTPChunkedOStream &)
HTTPChunkedOStreamoperator= (const HTTPChunkedOStream &)

Private Attributes

std::ostream & m_ostr
Array< Stringm_trailers

Detailed Description

Definition at line 80 of file OW_HTTPChunkedOStream.hpp.

Member Enumeration Documentation

enum OW_NAMESPACE::HTTPChunkedOStream::ESendLastChunkFlag


Definition at line 94 of file OW_HTTPChunkedOStream.hpp.

Constructor & Destructor Documentation

OW_NAMESPACE::HTTPChunkedOStream::HTTPChunkedOStream std::ostream &  ostr  ) 

Convert a ostream to a HTTPChunkedOStream.

The ostream that is passed in is wrapped. All output sent to the new stream is chunked, and then passed to the original stream.

ostr the ostream& to wrap.

OW_NAMESPACE::HTTPChunkedOStream::~HTTPChunkedOStream  ) 

Definition at line 97 of file OW_HTTPChunkedOStream.cpp.

OW_NAMESPACE::HTTPChunkedOStream::HTTPChunkedOStream const HTTPChunkedOStream  )  [private]

Member Function Documentation

void OW_NAMESPACE::HTTPChunkedOStream::addTrailer const String key,
const String value

Add a HTTP trailer (header at the end of a chunked entity).

key the name of the trailer (left of the ':')
value the value of the trailer (right of the ':')

Definition at line 128 of file OW_HTTPChunkedOStream.cpp.

References OW_NAMESPACE::String::empty(), m_trailers, OW_NAMESPACE::Array< T >::push_back(), and OW_NAMESPACE::String::trim().

std::ostream& OW_NAMESPACE::HTTPChunkedOStream::getOutputStreamOrig  )  [inline]

Get the original ostream&.

the original ostream

Definition at line 108 of file OW_HTTPChunkedOStream.hpp.

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

void OW_NAMESPACE::HTTPChunkedOStream::termOutput ESendLastChunkFlag  sendLastChunk = E_SEND_LAST_CHUNK  ) 

Call this when the entity has been completely sent.

This flushes the remaining output, and sends a zero length chunk, signalling the end of the entity.

Definition at line 102 of file OW_HTTPChunkedOStream.cpp.

References E_DISCARD_LAST_CHUNK, i, OW_NAMESPACE::BaseStreamBuffer::initPutBuffer(), m_ostr, OW_NAMESPACE::HTTPChunkedOStreamBase::m_strbuf, m_trailers, and OW_NAMESPACE::Array< T >::size().

Member Data Documentation

std::ostream& OW_NAMESPACE::HTTPChunkedOStream::m_ostr [private]

Definition at line 116 of file OW_HTTPChunkedOStream.hpp.

Referenced by termOutput().

Array<String> OW_NAMESPACE::HTTPChunkedOStream::m_trailers [private]

Definition at line 123 of file OW_HTTPChunkedOStream.hpp.

Referenced by addTrailer(), and termOutput().

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