vtkBase64Utilities Class Reference

#include <vtkBase64Utilities.h>

Inheritance diagram for vtkBase64Utilities:

Inheritance graph
[legend]
Collaboration diagram for vtkBase64Utilities:

Collaboration graph
[legend]

List of all members.


Detailed Description

base64 encode and decode utilities.

vtkBase64Utilities implements base64 encoding and decoding.

Definition at line 26 of file vtkBase64Utilities.h.


Public Types

typedef vtkObject Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)

Static Public Member Functions

static vtkBase64UtilitiesNew ()
static int IsTypeOf (const char *type)
static vtkBase64UtilitiesSafeDownCast (vtkObject *o)
static void EncodeTriplet (unsigned char i0, unsigned char i1, unsigned char i2, unsigned char *o0, unsigned char *o1, unsigned char *o2, unsigned char *o3)
static void EncodePair (unsigned char i0, unsigned char i1, unsigned char *o0, unsigned char *o1, unsigned char *o2, unsigned char *o3)
static void EncodeSingle (unsigned char i0, unsigned char *o0, unsigned char *o1, unsigned char *o2, unsigned char *o3)
static unsigned long Encode (const unsigned char *input, unsigned long length, unsigned char *output, int mark_end=0)
static int DecodeTriplet (unsigned char i0, unsigned char i1, unsigned char i2, unsigned char i3, unsigned char *o0, unsigned char *o1, unsigned char *o2)
static unsigned long Decode (const unsigned char *input, unsigned long length, unsigned char *output, unsigned long max_input_length=0)

Protected Member Functions

 vtkBase64Utilities ()
 ~vtkBase64Utilities ()

Member Typedef Documentation

Reimplemented from vtkObject.

Definition at line 30 of file vtkBase64Utilities.h.


Constructor & Destructor Documentation

vtkBase64Utilities::vtkBase64Utilities (  )  [inline, protected]

Definition at line 108 of file vtkBase64Utilities.h.

vtkBase64Utilities::~vtkBase64Utilities (  )  [inline, protected]

Definition at line 109 of file vtkBase64Utilities.h.


Member Function Documentation

static vtkBase64Utilities* vtkBase64Utilities::New (  )  [static]

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkObject.

virtual const char* vtkBase64Utilities::GetClassName (  )  [virtual]

Reimplemented from vtkObject.

static int vtkBase64Utilities::IsTypeOf ( const char *  name  )  [static]

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

virtual int vtkBase64Utilities::IsA ( const char *  name  )  [virtual]

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

static vtkBase64Utilities* vtkBase64Utilities::SafeDownCast ( vtkObject o  )  [static]

Reimplemented from vtkObject.

static void vtkBase64Utilities::EncodeTriplet ( unsigned char  i0,
unsigned char  i1,
unsigned char  i2,
unsigned char *  o0,
unsigned char *  o1,
unsigned char *  o2,
unsigned char *  o3 
) [static]

Encode 3 bytes into 4 bytes

static void vtkBase64Utilities::EncodePair ( unsigned char  i0,
unsigned char  i1,
unsigned char *  o0,
unsigned char *  o1,
unsigned char *  o2,
unsigned char *  o3 
) [static]

Encode 2 bytes into 4 bytes

static void vtkBase64Utilities::EncodeSingle ( unsigned char  i0,
unsigned char *  o0,
unsigned char *  o1,
unsigned char *  o2,
unsigned char *  o3 
) [static]

Encode 1 byte into 4 bytes

static unsigned long vtkBase64Utilities::Encode ( const unsigned char *  input,
unsigned long  length,
unsigned char *  output,
int  mark_end = 0 
) [static]

Encode 'length' bytes from the input buffer and store the encoded stream into the output buffer. Return the length of the encoded stream. Note that the output buffer must be allocated by the caller (length * 1.5 should be a safe estimate). If 'mark_end' is true than an extra set of 4 bytes is added to the end of the stream if the input is a multiple of 3 bytes. These bytes are invalid chars and therefore they will stop the decoder thus enabling the caller to decode a stream without actually knowing how much data to expect (if the input is not a multiple of 3 bytes then the extra padding needed to complete the encode 4 bytes will stop the decoding anyway).

static int vtkBase64Utilities::DecodeTriplet ( unsigned char  i0,
unsigned char  i1,
unsigned char  i2,
unsigned char  i3,
unsigned char *  o0,
unsigned char *  o1,
unsigned char *  o2 
) [static]

Decode 4 bytes into 3 bytes.

static unsigned long vtkBase64Utilities::Decode ( const unsigned char *  input,
unsigned long  length,
unsigned char *  output,
unsigned long  max_input_length = 0 
) [static]

Decode bytes from the input buffer and store the decoded stream into the output buffer until 'length' bytes have been decoded. Return the real length of the decoded stream (which should be equal to 'length'). Note that the output buffer must be allocated by the caller. If 'max_input_length' is not null, then it specifies the number of encoded bytes that should be at most read from the input buffer. In that case the 'length' parameter is ignored. This enables the caller to decode a stream without actually knowing how much decoded data to expect (of course, the buffer must be large enough).


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

Generated on Sat Dec 27 13:17:28 2008 for VTK by  doxygen 1.5.6