decaf::internal::net::URIEncoderDecoder Class Reference

#include <src/main/decaf/internal/net/URIEncoderDecoder.h>

Public Member Functions

 URIEncoderDecoder ()
virtual ~URIEncoderDecoder ()

Static Public Member Functions

static void validate (const std::string &s, const std::string &legal)
 Validate a string by checking if it contains any characters other than:.
static void validateSimple (const std::string &s, const std::string &legal)
 Validate a string by checking if it contains any characters other than:.
static std::string quoteIllegal (const std::string &s, const std::string &legal)
 All characters except letters ('a'.
static std::string encodeOthers (const std::string &s)
 Other characters, which are chars that are not US-ASCII, and are not ISO Control or are not ISO Space chars are not preserved.
static std::string decode (const std::string &s)
 Decodes the string argument which is assumed to be encoded in the x-www-form-urlencoded MIME content type using the UTF-8 encoding scheme.

Constructor & Destructor Documentation

decaf::internal::net::URIEncoderDecoder::URIEncoderDecoder (  ) 
virtual decaf::internal::net::URIEncoderDecoder::~URIEncoderDecoder (  )  [inline, virtual]

Member Function Documentation

static std::string decaf::internal::net::URIEncoderDecoder::decode ( const std::string &  s  )  [static]

Decodes the string argument which is assumed to be encoded in the x-www-form-urlencoded MIME content type using the UTF-8 encoding scheme.

'' and two following hex digit characters are converted to the equivalent byte value. All other characters are passed through unmodified.

e.g. "A%20B%20C %24%25" -> "A B C $%"

Parameters:
s - The encoded string.
Returns:
The decoded version.
static std::string decaf::internal::net::URIEncoderDecoder::encodeOthers ( const std::string &  s  )  [static]

Other characters, which are chars that are not US-ASCII, and are not ISO Control or are not ISO Space chars are not preserved.

They are converted into their hexidecimal value prepended by ''.

For example: Euro currency symbol -> "%E2%82%AC".

Parameters:
s - the string to be converted
Returns:
the converted string
static std::string decaf::internal::net::URIEncoderDecoder::quoteIllegal ( const std::string &  s,
const std::string &  legal 
) [static]

All characters except letters ('a'.

.'z', 'A'..'Z') and numbers ('0'..'9') and legal characters are converted into their hexidecimal value prepended by ''.

For example: '#' -> 23

Other characters, which are chars that are not US-ASCII, and are not ISO Control or are not ISO Space chars, are preserved.

Parameters:
s - the string to be converted
legal - the characters allowed to be preserved in the string s
Returns:
converted string
static void decaf::internal::net::URIEncoderDecoder::validate ( const std::string &  s,
const std::string &  legal 
) [static]

Validate a string by checking if it contains any characters other than:.

1. letters ('a'..'z', 'A'..'Z') 2. numbers ('0'..'9') 3. characters in the legalset parameter 4. characters that are not ISO Control or are not ISO Space characters)

Parameters:
s - the string to be validated
legal - the characters allowed in the string s
Exceptions:
URISyntaxException if the uri string is not well formed.
static void decaf::internal::net::URIEncoderDecoder::validateSimple ( const std::string &  s,
const std::string &  legal 
) [static]

Validate a string by checking if it contains any characters other than:.

1. letters ('a'..'z', 'A'..'Z') 2. numbers ('0'..'9') 3. characters in the legalset parameter

Parameters:
s - the string to be validated
legal - the characters allowed in the string s
Exceptions:
URISyntaxException if the uri string is not well formed.

The documentation for this class was generated from the following file:

Generated on 1 Dec 2014 for activemq-cpp-3.8.2 by  doxygen 1.6.1