Serializable objects to a byte stream.
This class is intentionally not thread safe.
Public Member Functions | |
| void | advanceCursor (uint32_t offset) |
| Advance the buffer cursor by the given offset. | |
| DataOutput () | |
| Construct a new DataOutput with an optional parameter to indicate whether the buffer created should be released in DataOutput destructor. | |
| const uint8_t * | getBuffer (uint32_t *rsize) const |
Get a pointer to the internal buffer of DataOutput. | |
| const uint8_t * | getBuffer () const |
Get a pointer to the internal buffer of DataOutput. | |
| uint32_t | getBufferLength () const |
Get the length of current data in the internal buffer of DataOutput. | |
| const uint8_t * | getCursor () |
Get an internal pointer to the current location in the DataOutput byte array. | |
| uint32_t | getRemainingBufferLength () const |
Get a pointer to the internal buffer of DataOutput. | |
| void | reset () |
| Reset the internal cursor to the start of the buffer. | |
| void | rewindCursor (uint32_t offset) |
| Rewind the buffer cursor by the given offset. | |
| void | write (int8_t value) |
Write a signed byte to the DataOutput. | |
| void | write (uint8_t value) |
Write an unsigned byte to the DataOutput. | |
| void | writeArrayLen (int32_t len) |
Write a 32-bit signed integer array length value to the DataOutput in a manner compatible with java server's DataSerializer.writeArrayLength. | |
| void | writeASCII (const char *value, uint32_t length=0) |
| Writes the given ASCII string supporting maximum length of 64K (i.e. | |
| void | writeASCIIHuge (const char *value, uint32_t length=0) |
| Writes the given ASCII string supporting upto maximum 32-bit integer value. | |
| void | writeBoolean (bool value) |
Write a boolean value to the DataOutput. | |
| void | writeBytes (const int8_t *bytes, int32_t len) |
Write an array of signed bytes to the DataOutput. | |
| void | writeBytes (const uint8_t *bytes, int32_t len) |
Write an array of unsigned bytes to the DataOutput. | |
| void | writeBytesOnly (const int8_t *bytes, uint32_t len) |
Write an array of signed bytes without its length to the DataOutput. | |
| void | writeBytesOnly (const uint8_t *bytes, uint32_t len) |
Write an array of unsigned bytes without its length to the DataOutput. | |
| void | writeChar (uint16_t value) |
Write a 16-bit Char (wchar_t) value to the DataOutput. | |
| void | writeDouble (double value) |
Write a double precision real number to the DataOutput. | |
| void | writeFloat (float value) |
Write a float value to the DataOutput. | |
| void | writeFullUTF (const char *value, uint32_t length=0) |
| Writes the given given string using java modified UTF-8 encoding supporting maximum encoded length of 64K (i.e. | |
| void | writeInt (int64_t value) |
Write a 64-bit signed integer value to the DataOutput. | |
| void | writeInt (int32_t value) |
Write a 32-bit signed integer value to the DataOutput. | |
| void | writeInt (int16_t value) |
Write a 16-bit signed integer value to the DataOutput. | |
| void | writeInt (uint64_t value) |
Write a 64-bit unsigned integer value to the DataOutput. | |
| void | writeInt (uint32_t value) |
Write a 32-bit unsigned integer value to the DataOutput. | |
| void | writeInt (uint16_t value) |
Write a 16-bit unsigned integer value to the DataOutput. | |
| void | writeObject (const Serializable *objptr) |
Write a Serializable object to the DataOutput. | |
| template<class PTR> | |
| void | writeObject (const SharedPtr< PTR > &objptr, bool isDelta=false) |
Write a Serializable object to the DataOutput. | |
| void | writeUTF (const wchar_t *value, uint32_t length=0) |
| Writes the given given string using java modified UTF-8 encoding supporting maximum encoded length of 64K (i.e. | |
| void | writeUTF (const char *value, uint32_t length=0) |
| Writes the given given string using java modified UTF-8 encoding supporting maximum encoded length of 64K (i.e. | |
| void | writeUTFHuge (const wchar_t *value, uint32_t length=0) |
| Writes the given string using java modified UTF-8 encoding. | |
| void | writeUTFHuge (const char *value, uint32_t length=0) |
| Writes the given string using java modified UTF-8 encoding. | |
| ~DataOutput () | |
| destructor | |
Static Public Member Functions | |
| static int32_t | getEncodedLength (const wchar_t *value, int32_t length=0, uint32_t *valLength=NULL) |
| Get the length required to represent a given wide-character string in java modified UTF-8 format. | |
| static int32_t | getEncodedLength (const char *value, int32_t length=0, uint32_t *valLength=NULL) |
| Get the length required to represent a given wide-character string in java modified UTF-8 format. | |
| gemfire::DataOutput::DataOutput | ( | ) |
Construct a new DataOutput with an optional parameter to indicate whether the buffer created should be released in DataOutput destructor.
| gemfire::DataOutput::~DataOutput | ( | ) | [inline] |
destructor
| void gemfire::DataOutput::advanceCursor | ( | uint32_t | offset | ) | [inline] |
Advance the buffer cursor by the given offset.
| offset | the offset by which to advance the cursor |
| const uint8_t* gemfire::DataOutput::getBuffer | ( | uint32_t * | rsize | ) | const [inline] |
Get a pointer to the internal buffer of DataOutput.
| rsize | the size of buffer is filled in this output parameter; should not be NULL |
| const uint8_t* gemfire::DataOutput::getBuffer | ( | ) | const [inline] |
Get a pointer to the internal buffer of DataOutput.
| uint32_t gemfire::DataOutput::getBufferLength | ( | ) | const [inline] |
Get the length of current data in the internal buffer of DataOutput.
| const uint8_t* gemfire::DataOutput::getCursor | ( | ) | [inline] |
Get an internal pointer to the current location in the DataOutput byte array.
| static int32_t gemfire::DataOutput::getEncodedLength | ( | const wchar_t * | value, | |
| int32_t | length = 0, |
|||
| uint32_t * | valLength = NULL | |||
| ) | [inline, static] |
Get the length required to represent a given wide-character string in java modified UTF-8 format.
| value | The wide-character string. | |
| length | The length of the string. |
| static int32_t gemfire::DataOutput::getEncodedLength | ( | const char * | value, | |
| int32_t | length = 0, |
|||
| uint32_t * | valLength = NULL | |||
| ) | [inline, static] |
Get the length required to represent a given wide-character string in java modified UTF-8 format.
| value | The C string. | |
| length | The length of the string; or zero to use the full string. |
| uint32_t gemfire::DataOutput::getRemainingBufferLength | ( | ) | const [inline] |
Get a pointer to the internal buffer of DataOutput.
| void gemfire::DataOutput::reset | ( | ) | [inline] |
Reset the internal cursor to the start of the buffer.
| void gemfire::DataOutput::rewindCursor | ( | uint32_t | offset | ) | [inline] |
Rewind the buffer cursor by the given offset.
| offset | the offset by which to rewind the cursor |
| void gemfire::DataOutput::write | ( | int8_t | value | ) | [inline] |
| void gemfire::DataOutput::write | ( | uint8_t | value | ) | [inline] |
| void gemfire::DataOutput::writeArrayLen | ( | int32_t | len | ) | [inline] |
Write a 32-bit signed integer array length value to the DataOutput in a manner compatible with java server's DataSerializer.writeArrayLength.
| value | the 32-bit signed integer array length to be written |
| void gemfire::DataOutput::writeASCII | ( | const char * | value, | |
| uint32_t | length = 0 | |||
| ) | [inline] |
Writes the given ASCII string supporting maximum length of 64K (i.e.
unsigned 16-bit integer).
writeBytes or writeASCIIHuge to write ASCII strings of length larger than this.| value | the C string to be written | |
| length | the number of characters from start of string to be written; the default value of 0 implies the complete string |
| void gemfire::DataOutput::writeASCIIHuge | ( | const char * | value, | |
| uint32_t | length = 0 | |||
| ) | [inline] |
Writes the given ASCII string supporting upto maximum 32-bit integer value.
writeASCII method will truncate strings greater than 64K in size.| value | the wide-character string to be written | |
| length | the number of characters from start of string to be written; the default value of 0 implies the complete string |
| void gemfire::DataOutput::writeBoolean | ( | bool | value | ) | [inline] |
| void gemfire::DataOutput::writeBytes | ( | const int8_t * | bytes, | |
| int32_t | len | |||
| ) | [inline] |
Write an array of signed bytes to the DataOutput.
| value | the array of signed bytes to be written | |
| len | the number of bytes from the start of array to be written |
| void gemfire::DataOutput::writeBytes | ( | const uint8_t * | bytes, | |
| int32_t | len | |||
| ) | [inline] |
Write an array of unsigned bytes to the DataOutput.
| value | the array of unsigned bytes to be written | |
| len | the number of bytes from the start of array to be written |
| void gemfire::DataOutput::writeBytesOnly | ( | const int8_t * | bytes, | |
| uint32_t | len | |||
| ) | [inline] |
Write an array of signed bytes without its length to the DataOutput.
writeBytes is that this does write the length of bytes so the corresponding DataInput::readBytesOnly (unlike DataInput::readBytes) needs the length argument explicitly.| value | the array of signed bytes to be written | |
| len | the number of bytes from the start of array to be written |
| void gemfire::DataOutput::writeBytesOnly | ( | const uint8_t * | bytes, | |
| uint32_t | len | |||
| ) | [inline] |
Write an array of unsigned bytes without its length to the DataOutput.
writeBytes is that this does write the length of bytes so the corresponding DataInput::readBytesOnly (unlike DataInput::readBytes) needs the length argument explicitly.| value | the array of unsigned bytes to be written | |
| len | the number of bytes from the start of array to be written |
| void gemfire::DataOutput::writeChar | ( | uint16_t | value | ) | [inline] |
Write a 16-bit Char (wchar_t) value to the DataOutput.
| value | the 16-bit wchar_t value to be written |
| void gemfire::DataOutput::writeDouble | ( | double | value | ) | [inline] |
Write a double precision real number to the DataOutput.
| value | the double precision real number to be written |
| void gemfire::DataOutput::writeFloat | ( | float | value | ) | [inline] |
| void gemfire::DataOutput::writeFullUTF | ( | const char * | value, | |
| uint32_t | length = 0 | |||
| ) | [inline] |
Writes the given given string using java modified UTF-8 encoding supporting maximum encoded length of 64K (i.e.
unsigned 16-bit integer).
writeUTFHuge to write strings of length larger than this.| value | the C string to be written |
| void gemfire::DataOutput::writeInt | ( | int64_t | value | ) | [inline] |
Write a 64-bit signed integer value to the DataOutput.
| value | the 64-bit signed integer value to be written |
| void gemfire::DataOutput::writeInt | ( | int32_t | value | ) | [inline] |
Write a 32-bit signed integer value to the DataOutput.
| value | the 32-bit signed integer value to be written |
| void gemfire::DataOutput::writeInt | ( | int16_t | value | ) | [inline] |
Write a 16-bit signed integer value to the DataOutput.
| value | the 16-bit signed integer value to be written |
| void gemfire::DataOutput::writeInt | ( | uint64_t | value | ) | [inline] |
Write a 64-bit unsigned integer value to the DataOutput.
| value | the 64-bit unsigned integer value to be written |
| void gemfire::DataOutput::writeInt | ( | uint32_t | value | ) | [inline] |
Write a 32-bit unsigned integer value to the DataOutput.
| value | the 32-bit unsigned integer value to be written |
| void gemfire::DataOutput::writeInt | ( | uint16_t | value | ) | [inline] |
Write a 16-bit unsigned integer value to the DataOutput.
| value | the 16-bit unsigned integer value to be written |
| void gemfire::DataOutput::writeObject | ( | const Serializable * | objptr | ) | [inline] |
Write a Serializable object to the DataOutput.
| objptr | pointer to the Serializable object to be written |
| void gemfire::DataOutput::writeObject | ( | const SharedPtr< PTR > & | objptr, | |
| bool | isDelta = false | |||
| ) | [inline] |
Write a Serializable object to the DataOutput.
| objptr | smart pointer to the Serializable object to be written |
| void gemfire::DataOutput::writeUTF | ( | const wchar_t * | value, | |
| uint32_t | length = 0 | |||
| ) | [inline] |
Writes the given given string using java modified UTF-8 encoding supporting maximum encoded length of 64K (i.e.
unsigned 16-bit integer).
writeUTFHuge to write strings of length larger than this.| value | the wide-character string to be written | |
| length | the number of characters from start of string to be written; the default value of 0 implies the complete string |
| void gemfire::DataOutput::writeUTF | ( | const char * | value, | |
| uint32_t | length = 0 | |||
| ) | [inline] |
Writes the given given string using java modified UTF-8 encoding supporting maximum encoded length of 64K (i.e.
unsigned 16-bit integer).
writeUTFHuge to write strings of length larger than this.| value | the C string to be written | |
| length | the number of characters from start of string to be written; the default value of 0 implies the complete string |
| void gemfire::DataOutput::writeUTFHuge | ( | const wchar_t * | value, | |
| uint32_t | length = 0 | |||
| ) | [inline] |
Writes the given string using java modified UTF-8 encoding.
writeUTF method will truncate strings greater than 64K in size.| value | the wide-character string to be written | |
| length | the number of characters from start of string to be written; the default value of 0 implies the complete string |
| void gemfire::DataOutput::writeUTFHuge | ( | const char * | value, | |
| uint32_t | length = 0 | |||
| ) | [inline] |
Writes the given string using java modified UTF-8 encoding.
writeUTF method will truncate strings greater than 64K in size.| value | the C string to be written | |
| length | the number of characters from start of string to be written; the default value of 0 implies the complete string assuming a null terminated string; do not use this unless sure that the UTF string does not contain any null characters |