Base64 Class Reference

#include <Base64.hpp>

List of all members.

Static Public Member Functions

static XMLByteencode (const XMLByte *const inputData, const unsigned int inputLength, unsigned int *outputLength, MemoryManager *const memMgr=0)
static XMLBytedecode (const XMLByte *const inputData, unsigned int *outputLength, MemoryManager *const memMgr=0)
static XMLChdecode (const XMLCh *const inputData, unsigned int *outputLength, MemoryManager *const memMgr=0)
static int getDataLength (const XMLCh *const inputData)

Private Member Functions

 Base64 ()
 Base64 (const Base64 &)

Static Private Member Functions

static void init ()
static bool isData (const XMLByte &octet)
static bool isPad (const XMLByte &octet)
static XMLByte set1stOctet (const XMLByte &, const XMLByte &)
static XMLByte set2ndOctet (const XMLByte &, const XMLByte &)
static XMLByte set3rdOctet (const XMLByte &, const XMLByte &)
static void split1stOctet (const XMLByte &, XMLByte &, XMLByte &)
static void split2ndOctet (const XMLByte &, XMLByte &, XMLByte &)
static void split3rdOctet (const XMLByte &, XMLByte &, XMLByte &)

Static Private Attributes

static const XMLByte base64Alphabet []
static const XMLByte base64Padding
static XMLByte base64Inverse []
static bool isInitialized
static const unsigned int quadsPerLine


Detailed Description

Definition at line 79 of file Base64.hpp.


Constructor & Destructor Documentation

Base64::Base64 (  )  [private]

Base64::Base64 ( const Base64  )  [private]


Member Function Documentation

static XMLCh* Base64::decode ( const XMLCh *const   inputData,
unsigned int *  outputLength,
MemoryManager *const   memMgr = 0 
) [static]

Decodes Base64 data into XMLCh

NOTE: The returned buffer is dynamically allocated and is the responsibility of the caller to delete it when not longer needed. You can call XMLString::release to release this returned buffer.

If a memory manager is provided, ask the memory manager to de-allocate the returned buffer.

Parameters:
inputData Base64 data in XMLCh stream.
outputLength Length of decoded XMLCh stream
memMgr,client provided memory manager
Returns:
Decoded binary data in XMLCh stream, or NULL if input data can not be decoded.
See also:
XMLString::release(XMLCh**)

static XMLByte* Base64::decode ( const XMLByte *const   inputData,
unsigned int *  outputLength,
MemoryManager *const   memMgr = 0 
) [static]

Decodes Base64 data into octets

NOTE: The returned buffer is dynamically allocated and is the responsibility of the caller to delete it when not longer needed. You can call XMLString::release to release this returned buffer.

If a memory manager is provided, ask the memory manager to de-allocate the returned buffer.

Parameters:
inputData Base64 data in XMLByte stream.
outputLength Length of decoded XMLByte stream.
memMgr,client provided memory manager
Returns:
Decoded binary data in XMLByte stream, or NULL if input data can not be decoded.
See also:
XMLString::release(XMLByte**)

static XMLByte* Base64::encode ( const XMLByte *const   inputData,
const unsigned int  inputLength,
unsigned int *  outputLength,
MemoryManager *const   memMgr = 0 
) [static]

Encodes octets into Base64 data

NOTE: The returned buffer is dynamically allocated and is the responsibility of the caller to delete it when not longer needed. You can call XMLString::release to release this returned buffer.

If a memory manager is provided, ask the memory manager to de-allocate the returned buffer.

Parameters:
inputData Binary data in XMLByte stream.
inputLength Length of the XMLByte stream.
outputLength Length of the encoded Base64 byte stream.
memMgr,client provided memory manager
Returns:
Encoded Base64 data in XMLByte stream, or NULL if input data can not be encoded.
See also:
XMLString::release(XMLByte**)

static int Base64::getDataLength ( const XMLCh *const   inputData  )  [static]

Get data length

Returns length of decoded data given an array containing encoded data.

Parameters:
inputData Base64 data in XMLCh stream.
Returns:
Length of decoded data, or -1 if input data can not be decoded.

static void Base64::init (  )  [static, private]

static bool Base64::isData ( const XMLByte octet  )  [static, private]

bool Base64::isPad ( const XMLByte octet  )  [inline, static, private]

Definition at line 223 of file Base64.hpp.

References base64Padding.

XMLByte Base64::set1stOctet ( const XMLByte ,
const XMLByte  
) [inline, static, private]

Definition at line 228 of file Base64.hpp.

XMLByte Base64::set2ndOctet ( const XMLByte ,
const XMLByte  
) [inline, static, private]

Definition at line 233 of file Base64.hpp.

XMLByte Base64::set3rdOctet ( const XMLByte ,
const XMLByte  
) [inline, static, private]

Definition at line 238 of file Base64.hpp.

void Base64::split1stOctet ( const XMLByte ,
XMLByte ,
XMLByte  
) [inline, static, private]

Definition at line 243 of file Base64.hpp.

void Base64::split2ndOctet ( const XMLByte ,
XMLByte ,
XMLByte  
) [inline, static, private]

Definition at line 248 of file Base64.hpp.

void Base64::split3rdOctet ( const XMLByte ,
XMLByte ,
XMLByte  
) [inline, static, private]

Definition at line 253 of file Base64.hpp.


Member Data Documentation

const XMLByte Base64::base64Alphabet[] [static, private]

Definition at line 211 of file Base64.hpp.

XMLByte Base64::base64Inverse[] [static, private]

Definition at line 214 of file Base64.hpp.

const XMLByte Base64::base64Padding [static, private]

Definition at line 212 of file Base64.hpp.

Referenced by isPad().

bool Base64::isInitialized [static, private]

Definition at line 215 of file Base64.hpp.

const unsigned int Base64::quadsPerLine [static, private]

Definition at line 217 of file Base64.hpp.


The documentation for this class was generated from the following file:
Generated on Thu Dec 7 01:19:02 2006 for DT2005.panorama by  doxygen 1.4.7