Hazelcast C++ Client
Public Member Functions | List of all members
hazelcast::client::serialization::ObjectDataOutput Class Reference

Provides serialization methods for primitive types,a arrays of primitive types, Portable, IdentifiedDataSerializable and custom serializables. More...

#include <ObjectDataOutput.h>

Public Member Functions

 ObjectDataOutput (pimpl::DataOutput &dataOutput, pimpl::SerializerHolder *serializerHolder)
 Internal API Constructor.
 
 ObjectDataOutput ()
 Internal API Constructor.
 
std::auto_ptr< std::vector< byte > > toByteArray ()
 
void write (const std::vector< byte > &bytes)
 Writes all the bytes in array to stream. More...
 
void writeBoolean (bool value)
 
void writeByte (int32_t value)
 
void writeBytes (const byte *bytes, size_t len)
 
void writeShort (int32_t value)
 
void writeChar (int32_t value)
 
void writeInt (int32_t value)
 
void writeLong (int64_t value)
 
void writeFloat (float value)
 
void writeDouble (double value)
 
void writeUTF (const std::string *value)
 
void writeByteArray (const std::vector< byte > *value)
 
void writeCharArray (const std::vector< char > *value)
 
void writeBooleanArray (const std::vector< bool > *value)
 
void writeShortArray (const std::vector< int16_t > *value)
 
void writeIntArray (const std::vector< int32_t > *value)
 
void writeLongArray (const std::vector< int64_t > *value)
 
void writeFloatArray (const std::vector< float > *value)
 
void writeDoubleArray (const std::vector< double > *value)
 
void writeUTFArray (const std::vector< std::string * > *strings)
 
void writeData (const pimpl::Data *value)
 
template<typename T >
void writeObject (const T *object)
 
pimpl::DataOutput * getDataOutput () const
 
template<>
HAZELCAST_API void writeInternal (const std::vector< std::string > *object, boost::shared_ptr< StreamSerializer > &streamSerializer)
 
template<>
void writeInternal (const std::vector< std::string > *object, boost::shared_ptr< StreamSerializer > &streamSerializer)
 

Detailed Description

Provides serialization methods for primitive types,a arrays of primitive types, Portable, IdentifiedDataSerializable and custom serializables.

For custom serialization

See also
Serializer

Member Function Documentation

std::auto_ptr< std::vector< byte > > hazelcast::client::serialization::ObjectDataOutput::toByteArray ( )
Returns
copy of internal byte array
void hazelcast::client::serialization::ObjectDataOutput::write ( const std::vector< byte > &  bytes)

Writes all the bytes in array to stream.

Parameters
bytesto be written
void hazelcast::client::serialization::ObjectDataOutput::writeBoolean ( bool  value)
Parameters
valuethe bool value to be written
void hazelcast::client::serialization::ObjectDataOutput::writeBooleanArray ( const std::vector< bool > *  value)
Parameters
valuethe boolean values to be written
void hazelcast::client::serialization::ObjectDataOutput::writeByte ( int32_t  value)
Parameters
valuethe byte value to be written
void hazelcast::client::serialization::ObjectDataOutput::writeByteArray ( const std::vector< byte > *  value)
Parameters
valuethe bytes to be written
void hazelcast::client::serialization::ObjectDataOutput::writeBytes ( const byte *  bytes,
size_t  len 
)
Parameters
bytesThe data bytes to be written
lenNumber of bytes to write
void hazelcast::client::serialization::ObjectDataOutput::writeChar ( int32_t  value)
Parameters
valuethe char value to be written
void hazelcast::client::serialization::ObjectDataOutput::writeCharArray ( const std::vector< char > *  value)
Parameters
valuethe characters to be written
void hazelcast::client::serialization::ObjectDataOutput::writeData ( const pimpl::Data *  value)
Parameters
valuethe data value to be written
void hazelcast::client::serialization::ObjectDataOutput::writeDouble ( double  value)
Parameters
valuethe double value to be written
void hazelcast::client::serialization::ObjectDataOutput::writeDoubleArray ( const std::vector< double > *  value)
Parameters
valuethe double array value to be written
void hazelcast::client::serialization::ObjectDataOutput::writeFloat ( float  value)
Parameters
valuethe float value to be written
void hazelcast::client::serialization::ObjectDataOutput::writeFloatArray ( const std::vector< float > *  value)
Parameters
valuethe float array value to be written
void hazelcast::client::serialization::ObjectDataOutput::writeInt ( int32_t  value)
Parameters
valuethe int32_t value to be written
void hazelcast::client::serialization::ObjectDataOutput::writeIntArray ( const std::vector< int32_t > *  value)
Parameters
valuethe int32_t array value to be written
void hazelcast::client::serialization::ObjectDataOutput::writeLong ( int64_t  value)
Parameters
valuethe int64_t value to be written
void hazelcast::client::serialization::ObjectDataOutput::writeLongArray ( const std::vector< int64_t > *  value)
Parameters
valuethe int16_t array value to be written
template<typename T >
void hazelcast::client::serialization::ObjectDataOutput::writeObject ( const T *  object)
inline
Parameters
objectserializable object to be written
See also
Serializer
Exceptions
IOException
void hazelcast::client::serialization::ObjectDataOutput::writeShort ( int32_t  value)
Parameters
valuethe int16_t value to be written
void hazelcast::client::serialization::ObjectDataOutput::writeShortArray ( const std::vector< int16_t > *  value)
Parameters
valuethe int16_t array value to be written
void hazelcast::client::serialization::ObjectDataOutput::writeUTF ( const std::string *  value)
Parameters
valuethe UTF string value to be written
void hazelcast::client::serialization::ObjectDataOutput::writeUTFArray ( const std::vector< std::string * > *  strings)
Parameters
stringsthe array of strings to be serialized

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