BinaryData Class Reference

A helper class that wraps binary data. More...

#include <librets/BinaryData.h>

List of all members.

Public Member Functions

 BinaryData ()
 Default Constructor.
 BinaryData (unsigned char buffer[], int len)
 Construct and initialize from an array.
int Size () const
 Report the size of the media object.
std::string AsString () const
 Obtain the media as a string.
const char * AsChar () const
 Obtain the media as an array of characters.
void Copy (unsigned char buffer[], int length) const
 Make a copy of the data as the media object.
void ReadToEof (istreamPtr inputStream)
 Load the data contained in the input stream as the media object.


Detailed Description

A helper class that wraps binary data.

The BinaryData class wraps binary data returned from the RETS server into a string.


Constructor & Destructor Documentation

BinaryData (  )  [inline]

Default Constructor.

BinaryData ( unsigned char  buffer[],
int  len 
)

Construct and initialize from an array.


Member Function Documentation

const char* AsChar (  )  const

Obtain the media as an array of characters.

Returns:
pointer to the media.

std::string AsString (  )  const

Obtain the media as a string.

Returns:
std::string representing the media object.

void Copy ( unsigned char  buffer[],
int  length 
) const

Make a copy of the data as the media object.

Parameters:
buffer[] An array of characters containing the media object.
length An int representing the length of the media object in bytes.

void ReadToEof ( istreamPtr  inputStream  ) 

Load the data contained in the input stream as the media object.

Parameters:
inputStream A pointer to the input stream.

int Size (  )  const

Report the size of the media object.

Returns:
int representing the size in bytes of the media object.


Generated by  doxygen