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

Provides deserialization methods for primitives types, arrays of primitive types Portable, IdentifiedDataSerializable and custom serializable types. More...

#include <ObjectDataInput.h>

Public Member Functions

 ObjectDataInput (pimpl::DataInput &, pimpl::PortableContext &)
 Internal API. More...
 
void readFully (std::vector< byte > &byteArray)
 fills all content to given byteArray More...
 
int skipBytes (int i)
 
bool readBoolean ()
 
byte readByte ()
 
int16_t readShort ()
 
char readChar ()
 
int32_t readInt ()
 
int64_t readLong ()
 
float readFloat ()
 
double readDouble ()
 
std::auto_ptr< std::string > readUTF ()
 
std::auto_ptr< std::vector< byte > > readByteArray ()
 
std::auto_ptr< std::vector< bool > > readBooleanArray ()
 
std::auto_ptr< std::vector< char > > readCharArray ()
 
std::auto_ptr< std::vector< int32_t > > readIntArray ()
 
std::auto_ptr< std::vector< int64_t > > readLongArray ()
 
std::auto_ptr< std::vector< double > > readDoubleArray ()
 
std::auto_ptr< std::vector< float > > readFloatArray ()
 
std::auto_ptr< std::vector< int16_t > > readShortArray ()
 
std::auto_ptr< std::vector< std::string > > readUTFArray ()
 
template<typename T >
std::auto_ptr< T > readObject ()
 Object can be Portable, IdentifiedDataSerializable or custom serializable for custom serialization. More...
 
pimpl::Data readData ()
 
int position ()
 
void position (int newPos)
 Move cursor to given index. More...
 
template<>
HAZELCAST_API void readInternal (int typeId, byte *object)
 
template<>
HAZELCAST_API void readInternal (int typeId, bool *object)
 
template<>
HAZELCAST_API void readInternal (int typeId, char *object)
 
template<>
HAZELCAST_API void readInternal (int typeId, int16_t *object)
 
template<>
HAZELCAST_API void readInternal (int typeId, int32_t *object)
 
template<>
HAZELCAST_API void readInternal (int typeId, int64_t *object)
 
template<>
HAZELCAST_API void readInternal (int typeId, float *object)
 
template<>
HAZELCAST_API void readInternal (int typeId, double *object)
 
template<>
HAZELCAST_API void readInternal (int typeId, std::string *object)
 
template<>
void readInternal (int typeId, byte *object)
 
template<>
void readInternal (int typeId, bool *object)
 
template<>
void readInternal (int typeId, char *object)
 
template<>
void readInternal (int typeId, int16_t *object)
 
template<>
void readInternal (int typeId, int32_t *object)
 
template<>
void readInternal (int typeId, int64_t *object)
 
template<>
void readInternal (int typeId, float *object)
 
template<>
void readInternal (int typeId, double *object)
 
template<>
void readInternal (int typeId, std::string *object)
 

Detailed Description

Provides deserialization methods for primitives types, arrays of primitive types Portable, IdentifiedDataSerializable and custom serializable types.

Constructor & Destructor Documentation

hazelcast::client::serialization::ObjectDataInput::ObjectDataInput ( pimpl::DataInput &  dataInput,
pimpl::PortableContext &  context 
)

Internal API.

Constructor

Member Function Documentation

int hazelcast::client::serialization::ObjectDataInput::position ( )
Returns
current position index
void hazelcast::client::serialization::ObjectDataInput::position ( int  newPos)

Move cursor to given index.

Parameters
newPosnew position index to be set
bool hazelcast::client::serialization::ObjectDataInput::readBoolean ( )
Returns
the boolean read
Exceptions
IOExceptionif it reaches end of file before finish reading
std::auto_ptr< std::vector< bool > > hazelcast::client::serialization::ObjectDataInput::readBooleanArray ( )
Returns
the boolean array read
Exceptions
IOExceptionif it reaches end of file before finish reading
byte hazelcast::client::serialization::ObjectDataInput::readByte ( )
Returns
the byte read
Exceptions
IOExceptionif it reaches end of file before finish reading
std::auto_ptr< std::vector< byte > > hazelcast::client::serialization::ObjectDataInput::readByteArray ( )
Returns
the byte array read
Exceptions
IOExceptionif it reaches end of file before finish reading
char hazelcast::client::serialization::ObjectDataInput::readChar ( )
Returns
the char read
Exceptions
IOExceptionif it reaches end of file before finish reading
std::auto_ptr< std::vector< char > > hazelcast::client::serialization::ObjectDataInput::readCharArray ( )
Returns
the char array read
Exceptions
IOExceptionif it reaches end of file before finish reading
pimpl::Data hazelcast::client::serialization::ObjectDataInput::readData ( )
Returns
the data read
Exceptions
IOExceptionif it reaches end of file before finish reading
double hazelcast::client::serialization::ObjectDataInput::readDouble ( )
Returns
the double read
Exceptions
IOExceptionif it reaches end of file before finish reading
std::auto_ptr< std::vector< double > > hazelcast::client::serialization::ObjectDataInput::readDoubleArray ( )
Returns
the double array read
Exceptions
IOExceptionif it reaches end of file before finish reading
float hazelcast::client::serialization::ObjectDataInput::readFloat ( )
Returns
the boolean read
Exceptions
IOExceptionif it reaches end of file before finish reading
std::auto_ptr< std::vector< float > > hazelcast::client::serialization::ObjectDataInput::readFloatArray ( )
Returns
the float array read
Exceptions
IOExceptionif it reaches end of file before finish reading
void hazelcast::client::serialization::ObjectDataInput::readFully ( std::vector< byte > &  byteArray)

fills all content to given byteArray

Parameters
byteArrayto fill the data in
int32_t hazelcast::client::serialization::ObjectDataInput::readInt ( )
Returns
the int32_t read
Exceptions
IOExceptionif it reaches end of file before finish reading
std::auto_ptr< std::vector< int32_t > > hazelcast::client::serialization::ObjectDataInput::readIntArray ( )
Returns
the int32_t array read
Exceptions
IOExceptionif it reaches end of file before finish reading
int64_t hazelcast::client::serialization::ObjectDataInput::readLong ( )
Returns
the int64_t read
Exceptions
IOExceptionif it reaches end of file before finish reading
std::auto_ptr< std::vector< int64_t > > hazelcast::client::serialization::ObjectDataInput::readLongArray ( )
Returns
the int64_t array read
Exceptions
IOExceptionif it reaches end of file before finish reading
template<typename T >
std::auto_ptr<T> hazelcast::client::serialization::ObjectDataInput::readObject ( )
inline

Object can be Portable, IdentifiedDataSerializable or custom serializable for custom serialization.

See also
Serializer
Returns
the object read
Exceptions
IOExceptionif it reaches end of file before finish reading
int16_t hazelcast::client::serialization::ObjectDataInput::readShort ( )
Returns
the int16_t read
Exceptions
IOExceptionif it reaches end of file before finish reading
std::auto_ptr< std::vector< int16_t > > hazelcast::client::serialization::ObjectDataInput::readShortArray ( )
Returns
the int16_t array read
Exceptions
IOExceptionif it reaches end of file before finish reading
std::auto_ptr< std::string > hazelcast::client::serialization::ObjectDataInput::readUTF ( )
Returns
the utf string read as an ascii string
Exceptions
IOExceptionif it reaches end of file before finish reading
std::auto_ptr< std::vector< std::string > > hazelcast::client::serialization::ObjectDataInput::readUTFArray ( )
Returns
the array of strings
Exceptions
IOExceptionif it reaches end of file before finish reading
int hazelcast::client::serialization::ObjectDataInput::skipBytes ( int  i)
Parameters
inumber of bytes to skip

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