00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00021 #ifndef __vtkBase64Utilities_h
00022 #define __vtkBase64Utilities_h
00023
00024 #include "vtkObject.h"
00025
00026 class VTK_IO_EXPORT vtkBase64Utilities : public vtkObject
00027 {
00028 public:
00029 static vtkBase64Utilities *New();
00030 vtkTypeMacro(vtkBase64Utilities,vtkObject);
00031
00033
00034 static void EncodeTriplet(unsigned char i0,
00035 unsigned char i1,
00036 unsigned char i2,
00037 unsigned char *o0,
00038 unsigned char *o1,
00039 unsigned char *o2,
00040 unsigned char *o3);
00042
00044
00045 static void EncodePair(unsigned char i0,
00046 unsigned char i1,
00047 unsigned char *o0,
00048 unsigned char *o1,
00049 unsigned char *o2,
00050 unsigned char *o3);
00052
00054
00055 static void EncodeSingle(unsigned char i0,
00056 unsigned char *o0,
00057 unsigned char *o1,
00058 unsigned char *o2,
00059 unsigned char *o3);
00061
00063
00073 static unsigned long Encode(const unsigned char *input,
00074 unsigned long length,
00075 unsigned char *output,
00076 int mark_end = 0);
00078
00079
00081
00082 static int DecodeTriplet(unsigned char i0,
00083 unsigned char i1,
00084 unsigned char i2,
00085 unsigned char i3,
00086 unsigned char *o0,
00087 unsigned char *o1,
00088 unsigned char *o2);
00090
00092
00101 static unsigned long Decode(const unsigned char *input,
00102 unsigned long length,
00103 unsigned char *output,
00104 unsigned long max_input_length = 0);
00106
00107 protected:
00108 vtkBase64Utilities() {};
00109 ~vtkBase64Utilities() {};
00110
00111 private:
00112 vtkBase64Utilities(const vtkBase64Utilities&);
00113 void operator=(const vtkBase64Utilities&);
00114 };
00115
00116 #endif