Apache Geode Native .NET Reference 1.15.0
Apache::Geode::Client::DataInput Class Reference

Provides operations for reading primitive data values, byte arrays, strings, ISerializable objects from a byte stream. More...

#include <DataInput.hpp>

Public Member Functions

 !DataInput ()
 Finalizer: frees the internal buffer. More...
 
void AdvanceCursor (size_t offset)
 Advance the cursor of the buffer by the given offset. More...
 
 DataInput (array< Byte >^ buffer, Cache^ cache)
 Construct DataInput using an given array of bytes. More...
 
 DataInput (array< Byte >^ buffer, size_t len, Cache^ cache)
 Construct DataInput using a given length of an array of bytes. More...
 
int ReadArrayLen ()
 Read a array len based on array size. More...
 
array< array< Byte >^> ^ ReadArrayOfByteArrays ()
 Read a array of signed byte array from the stream. More...
 
bool ReadBoolean ()
 Read a boolean value from the stream. More...
 
array< bool > ^ ReadBooleanArray ()
 Read a bool array from the stream. More...
 
array< Byte > ^ ReadBytes ()
 Read an array of bytes from the stream reading the length from the stream first. More...
 
array< Byte > ^ ReadBytesOnly (System::UInt32 len)
 Read the given number of bytes from the stream. More...
 
Char ReadChar ()
 
array< Char > ^ ReadCharArray ()
 Read a char array from the stream. More...
 
void ReadCollection (System::Collections::IList^ list)
 Read a collection from the stream in a given collection instance. More...
 
System::DateTime ReadDate ()
 Read a date from the stream. More...
 
void ReadDictionary (System::Collections::IDictionary^ dictionary)
 Read a dictionary from the stream in a given dictionary instance. More...
 
double ReadDouble ()
 Read a double precision number from the stream. More...
 
array< double > ^ ReadDoubleArray ()
 Read a double array from the stream. More...
 
float ReadFloat ()
 Read a floating point number from the stream. More...
 
array< float > ^ ReadFloatArray ()
 Read a float array from the stream. More...
 
System::Int16 ReadInt16 ()
 Read a 16-bit integer from the stream. More...
 
System::Int32 ReadInt32 ()
 Read a 32-bit integer from the stream. More...
 
System::Int64 ReadInt64 ()
 Read a 64-bit integer from the stream. More...
 
array< Int32 > ^ ReadIntArray ()
 Read a int array from the stream. More...
 
array< Int64 > ^ ReadLongArray ()
 Read a long array from the stream. More...
 
Object ^ ReadObject ()
 Read a serializable object from the data. More...
 
List< Object^> ^ ReadObjectArray ()
 Read a object array from the stream from the stream. More...
 
SByte ReadSByte ()
 Read a signed byte from the stream. More...
 
array< SByte > ^ ReadSBytes ()
 Read an array of signed bytes from the stream reading the length from the stream first. More...
 
array< SByte > ^ ReadSBytesOnly (System::UInt32 len)
 Read the given number of signed bytes from the stream. More...
 
array< Int16 > ^ ReadShortArray ()
 Read a short int array from the stream. More...
 
String ^ ReadUTF ()
 Read a string after java-modified UTF-8 decoding from the stream. More...
 
void Reset ()
 Reset the cursor to the start of buffer. More...
 
void RewindCursor (size_t offset)
 Rewind the cursor of the buffer by the given offset. More...
 
 ~DataInput ()
 Dispose: frees the internal buffer. More...
 

Properties

size_t BytesRead [get]
 Get the count of bytes that have been read from the stream. More...
 
size_t BytesRemaining [get]
 Get the count of bytes that are remaining in the buffer. More...
 

Detailed Description

Provides operations for reading primitive data values, byte arrays, strings, ISerializable objects from a byte stream.

Constructor & Destructor Documentation

◆ DataInput() [1/2]

Apache::Geode::Client::DataInput::DataInput ( array< Byte >^  buffer,
Cache cache 
)

Construct DataInput using an given array of bytes.

Parameters
bufferThe buffer to use for reading data values
Exceptions
IllegalArgumentExceptionif the buffer is null

◆ DataInput() [2/2]

Apache::Geode::Client::DataInput::DataInput ( array< Byte >^  buffer,
size_t  len,
Cache cache 
)

Construct DataInput using a given length of an array of bytes.

Parameters
bufferThe buffer to use for reading data values.
lenThe number of bytes from the start of the buffer to use.
Exceptions
IllegalArgumentExceptionif the buffer is null

◆ ~DataInput()

Apache::Geode::Client::DataInput::~DataInput ( )
inline

Dispose: frees the internal buffer.

◆ !DataInput()

Apache::Geode::Client::DataInput::!DataInput ( )
inline

Finalizer: frees the internal buffer.

Member Function Documentation

◆ AdvanceCursor()

void Apache::Geode::Client::DataInput::AdvanceCursor ( size_t  offset)

Advance the cursor of the buffer by the given offset.

Parameters
offsetThe offset(number of bytes) by which to advance the cursor.

◆ ReadArrayLen()

int Apache::Geode::Client::DataInput::ReadArrayLen ( )

Read a array len based on array size.

◆ ReadArrayOfByteArrays()

array< array< Byte >^> ^ Apache::Geode::Client::DataInput::ReadArrayOfByteArrays ( )

Read a array of signed byte array from the stream.

◆ ReadBoolean()

bool Apache::Geode::Client::DataInput::ReadBoolean ( )

Read a boolean value from the stream.

◆ ReadBooleanArray()

array< bool > ^ Apache::Geode::Client::DataInput::ReadBooleanArray ( )

Read a bool array from the stream.

◆ ReadBytes()

array< Byte > ^ Apache::Geode::Client::DataInput::ReadBytes ( )

Read an array of bytes from the stream reading the length from the stream first.

◆ ReadBytesOnly()

array< Byte > ^ Apache::Geode::Client::DataInput::ReadBytesOnly ( System::UInt32  len)

Read the given number of bytes from the stream.

Parameters
lenNumber of bytes to read.

◆ ReadChar()

Char Apache::Geode::Client::DataInput::ReadChar ( )

Read a char value from the stream.

◆ ReadCharArray()

array< Char > ^ Apache::Geode::Client::DataInput::ReadCharArray ( )

Read a char array from the stream.

◆ ReadCollection()

void Apache::Geode::Client::DataInput::ReadCollection ( System::Collections::IList^  list)

Read a collection from the stream in a given collection instance.

Parameters
listObject which implements System::Collections::IList interface.

◆ ReadDate()

System::DateTime Apache::Geode::Client::DataInput::ReadDate ( )

Read a date from the stream.

◆ ReadDictionary()

void Apache::Geode::Client::DataInput::ReadDictionary ( System::Collections::IDictionary^  dictionary)

Read a dictionary from the stream in a given dictionary instance.

Parameters
dictionaryObject which implements System::Collections::IDictionary interface.

◆ ReadDouble()

double Apache::Geode::Client::DataInput::ReadDouble ( )

Read a double precision number from the stream.

◆ ReadDoubleArray()

array< double > ^ Apache::Geode::Client::DataInput::ReadDoubleArray ( )

Read a double array from the stream.

◆ ReadFloat()

float Apache::Geode::Client::DataInput::ReadFloat ( )

Read a floating point number from the stream.

◆ ReadFloatArray()

array< float > ^ Apache::Geode::Client::DataInput::ReadFloatArray ( )

Read a float array from the stream.

◆ ReadInt16()

System::Int16 Apache::Geode::Client::DataInput::ReadInt16 ( )

Read a 16-bit integer from the stream.

◆ ReadInt32()

System::Int32 Apache::Geode::Client::DataInput::ReadInt32 ( )

Read a 32-bit integer from the stream.

◆ ReadInt64()

System::Int64 Apache::Geode::Client::DataInput::ReadInt64 ( )

Read a 64-bit integer from the stream.

◆ ReadIntArray()

array< Int32 > ^ Apache::Geode::Client::DataInput::ReadIntArray ( )

Read a int array from the stream.

◆ ReadLongArray()

array< Int64 > ^ Apache::Geode::Client::DataInput::ReadLongArray ( )

Read a long array from the stream.

◆ ReadObject()

Object ^ Apache::Geode::Client::DataInput::ReadObject ( )

Read a serializable object from the data.

Null objects are handled.

◆ ReadObjectArray()

List< Object^> ^ Apache::Geode::Client::DataInput::ReadObjectArray ( )

Read a object array from the stream from the stream.

◆ ReadSByte()

SByte Apache::Geode::Client::DataInput::ReadSByte ( )

Read a signed byte from the stream.

◆ ReadSBytes()

array< SByte > ^ Apache::Geode::Client::DataInput::ReadSBytes ( )

Read an array of signed bytes from the stream reading the length from the stream first.

◆ ReadSBytesOnly()

array< SByte > ^ Apache::Geode::Client::DataInput::ReadSBytesOnly ( System::UInt32  len)

Read the given number of signed bytes from the stream.

Parameters
lenNumber of signed bytes to read.

◆ ReadShortArray()

array< Int16 > ^ Apache::Geode::Client::DataInput::ReadShortArray ( )

Read a short int array from the stream.

◆ ReadUTF()

String ^ Apache::Geode::Client::DataInput::ReadUTF ( )

Read a string after java-modified UTF-8 decoding from the stream.

The maximum length supported is 2^16-1 beyond which the string shall be truncated.

◆ Reset()

void Apache::Geode::Client::DataInput::Reset ( )

Reset the cursor to the start of buffer.

◆ RewindCursor()

void Apache::Geode::Client::DataInput::RewindCursor ( size_t  offset)

Rewind the cursor of the buffer by the given offset.

Parameters
offsetThe offset(number of bytes) by which to rewind the cursor.

Property Documentation

◆ BytesRead

size_t Apache::Geode::Client::DataInput::BytesRead
get

Get the count of bytes that have been read from the stream.

◆ BytesRemaining

size_t Apache::Geode::Client::DataInput::BytesRemaining
get

Get the count of bytes that are remaining in the buffer.


Apache Geode C++ Cache .NET API Documentation