SourcePro® API Reference Guide

 
List of all members | Public Member Functions
RWHttpRangeHeader Class Reference

Helper class that defines an HTTP Range header. More...

#include <rw/http/RWHttpRangeHeader.h>

Inheritance diagram for RWHttpRangeHeader:
RWHttpHeaderBase

Public Member Functions

 RWHttpRangeHeader ()
 
 RWHttpRangeHeader (const RWHttpRange &range)
 
 RWHttpRangeHeader (const RWHttpGenericHeader &hdr)
 
void addRange (const RWHttpRange &range)
 
virtual RWCString getValue () const
 
- Public Member Functions inherited from RWHttpHeaderBase
virtual bool append (const RWCString &str)
 
virtual RWCString asString (void) const
 
RWCString getLabel (void) const
 
RWHttpHeaderType getType () const
 
bool operator!= (const RWHttpHeaderBase &) const
 
bool operator< (const RWHttpHeaderBase &hdr) const
 
bool operator== (const RWHttpHeaderBase &h) const
 

Additional Inherited Members

- Static Public Member Functions inherited from RWHttpHeaderBase
static unsigned hash (const RWHttpHeaderBase &)
 
- Protected Member Functions inherited from RWHttpHeaderBase
 RWHttpHeaderBase (void)
 
 RWHttpHeaderBase (const RWCString &label, RWHttpHeaderType type=RW_HTTP_ENTITY_HEADER)
 

Detailed Description

RWHttpRangeHeader is a specialization class of RWHttpHeaderBase that defines the HTTP Range header. It is a helper class that formats its contents as Range: bytes=start_range - stop_range.

Constructor & Destructor Documentation

RWHttpRangeHeader::RWHttpRangeHeader ( void  )
inline

Constructs a default RWHttpRangeHeader object with the header label set to Range and its associated range request to the current length of the entity-body in bytes.

RWHttpRangeHeader::RWHttpRangeHeader ( const RWHttpRange range)
inline

Constructs an RWHttpRangeHeader object with the header label set to Range and its associated range request set by the RWHttpRange object range.

RWHttpRangeHeader::RWHttpRangeHeader ( const RWHttpGenericHeader hdr)

Constructs an RWHttpRangeHeader from a RWHttpGenericHeader. If the RWHttpGenericHeader is not a properly formatted HTTP Range Header, an RWHttpHeaderParseError exception is thrown.

Member Function Documentation

void RWHttpRangeHeader::addRange ( const RWHttpRange range)
inline

Adds a range defined by the RWHttpRange object range to the internal range list.

virtual RWCString RWHttpRangeHeader::getValue ( ) const
virtual

Returns an RWCString representing the range request. The RWCString should contain 7-bit US-ASCII data.

Implements RWHttpHeaderBase.

Copyright © 2023 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.