SourcePro® API Reference Guide

 
List of all members | Public Member Functions
RWHttpContentLengthHeader Class Reference

Helper class that defines an HTTP Content-Length entity header. More...

#include <rw/http/RWHttpContentLengthHeader.h>

Inheritance diagram for RWHttpContentLengthHeader:
RWHttpHeaderBase

Public Member Functions

 RWHttpContentLengthHeader (void)
 
 RWHttpContentLengthHeader (int value)
 
 RWHttpContentLengthHeader (const RWHttpGenericHeader &hdr)
 
int getLength () const
 
RWCString getValue (void) const
 
void setValue (int value)
 
RWCString value (void) 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

RWHttpContentLengthHeader is a specialization class of RWHttpHeaderBase. It is a helper class that formats its contents as Content-Length: header_value, where header_value is the length in bytes of an HTTP command's body information.

Constructor & Destructor Documentation

RWHttpContentLengthHeader::RWHttpContentLengthHeader ( void  )
inline

Constructs a default RWHttpContentLengthHeader object with the label Content-Length and a value of 0.

RWHttpContentLengthHeader::RWHttpContentLengthHeader ( int  value)
inline

Constructs an RWHttpContentLengthHeader object with the label Content-Length and a value of value.

RWHttpContentLengthHeader::RWHttpContentLengthHeader ( const RWHttpGenericHeader hdr)

Constructs an RWHttpContentLengthHeader object from an RWHttpGenericHeader that represents a Content-Length HTTP header. If the RWHttpGenericHeader does not represent a Content-Length HTTP header or if the value of the RWHttpGenericHeader does not conform to the formatting of a Content-Length value, an RWHttpHeaderParseError exception is thrown.

Member Function Documentation

int RWHttpContentLengthHeader::getLength ( ) const
inline

Returns the internal length of the header.

RWCString RWHttpContentLengthHeader::getValue ( void  ) const
virtual

Returns the internal value as an RWCString. The RWCString should contain 7-bit US-ASCII data.

Implements RWHttpHeaderBase.

void RWHttpContentLengthHeader::setValue ( int  value)
inline

Assigns internal value to value.

RWCString RWHttpContentLengthHeader::value ( void  ) const
inline
Deprecated:
As of SourcePro 4, use getValue() instead.

Returns the internal value as an RWCString. The RWCString should contain 7-bit US-ASCII data.

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