GemStone::GemFire::Cache::Generic::DataInput Class Reference

Inherits GemStone::GemFire::Cache::Generic::Internal::UMWrap< gemfire::DataInput >.


Detailed Description

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

Public Member Functions

 !DataInput ()
void AdvanceCursor (int32_t offset)
 DataInput (array< Byte >^buffer, int32_t len)
 DataInput (array< Byte >^buffer)
int ReadArrayLen ()
array< array< Byte >^>^ ReadArrayOfByteArrays ()
String^ ReadASCIIHuge ()
bool ReadBoolean ()
array< bool >^ ReadBooleanArray ()
array< Byte >^ ReadBytes ()
array< Byte >^ ReadBytesOnly (uint32_t len)
Char ReadChar ()
array< Char >^ ReadCharArray ()
void ReadCollection (System::Collections::IList^ list)
System::DateTime ReadDate ()
void ReadDictionary (System::Collections::IDictionary^ dictionary)
double ReadDouble ()
array< double >^ ReadDoubleArray ()
float ReadFloat ()
array< float >^ ReadFloatArray ()
int16_t ReadInt16 ()
int32_t ReadInt32 ()
int64_t ReadInt64 ()
array< Int32 >^ ReadIntArray ()
array< Int64 >^ ReadLongArray ()
Object^ ReadObject ()
List< Object^ >^ ReadObjectArray ()
SByte ReadSByte ()
array< SByte >^ ReadSBytes ()
array< SByte >^ ReadSBytesOnly (uint32_t len)
array< Int16 >^ ReadShortArray ()
String^ ReadUTF ()
String^ ReadUTFHuge ()
void Reset ()
void RewindCursor (int32_t offset)
 ~DataInput ()

Protected Member Functions

void InternalCleanup ()
void SetPtr (gemfire::DataInput *nativeptr, bool own)

Properties

uint32_t BytesRead [get]
uint32_t BytesRemaining [get]
IntPtr NativeIntPtr [get]
bool Own [get, set]

Constructor & Destructor Documentation

GemStone::GemFire::Cache::Generic::DataInput::DataInput ( array< Byte >^  buffer  ) 

Construct DataInput using an given array of bytes.

Parameters:
buffer The buffer to use for reading data values.
Exceptions:
IllegalArgumentException if the buffer is null

GemStone::GemFire::Cache::Generic::DataInput::DataInput ( array< Byte >^  buffer,
int32_t  len 
)

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

Parameters:
buffer The buffer to use for reading data values.
len The number of bytes from the start of the buffer to use.
Exceptions:
IllegalArgumentException if the buffer is null

GemStone::GemFire::Cache::Generic::DataInput::~DataInput (  )  [inline]

Dispose: frees the internal buffer.

GemStone::GemFire::Cache::Generic::DataInput::!DataInput (  )  [inline]

Finalizer: frees the internal buffer.


Member Function Documentation

void GemStone::GemFire::Cache::Generic::DataInput::AdvanceCursor ( int32_t  offset  ) 

Advance the cursor of the buffer by the given offset.

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

void GemStone::GemFire::Cache::Generic::Internal::UMWrap< gemfire::DataInput >::InternalCleanup (  )  [inline, protected, inherited]

Internal cleanup function invoked by dispose/finalizer.

int GemStone::GemFire::Cache::Generic::DataInput::ReadArrayLen (  ) 

Read a array len based on array size.

array<array<Byte>^> ^ GemStone::GemFire::Cache::Generic::DataInput::ReadArrayOfByteArrays (  ) 

Read a array of signed byte array from the stream.

String ^ GemStone::GemFire::Cache::Generic::DataInput::ReadASCIIHuge (  ) 

Read a ASCII string from the stream. Where size is more than 2^16-1

bool GemStone::GemFire::Cache::Generic::DataInput::ReadBoolean (  ) 

Read a boolean value from the stream.

array<bool> ^ GemStone::GemFire::Cache::Generic::DataInput::ReadBooleanArray (  ) 

Read a bool array from the stream.

array<Byte> ^ GemStone::GemFire::Cache::Generic::DataInput::ReadBytes (  ) 

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

array<Byte> ^ GemStone::GemFire::Cache::Generic::DataInput::ReadBytesOnly ( uint32_t  len  ) 

Read the given number of bytes from the stream.

Parameters:
len Number of bytes to read.

Char GemStone::GemFire::Cache::Generic::DataInput::ReadChar (  ) 

Read a char value from the stream.

array<Char> ^ GemStone::GemFire::Cache::Generic::DataInput::ReadCharArray (  ) 

Read a char array from the stream.

void GemStone::GemFire::Cache::Generic::DataInput::ReadCollection ( System::Collections::IList^   list  ) 

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

Parameters:
list Object which implements System::Collections::IList interface.

System::DateTime GemStone::GemFire::Cache::Generic::DataInput::ReadDate (  ) 

Read a date from the stream.

void GemStone::GemFire::Cache::Generic::DataInput::ReadDictionary ( System::Collections::IDictionary^   dictionary  ) 

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

Parameters:
dictionary Object which implements System::Collections::IDictionary interface.

double GemStone::GemFire::Cache::Generic::DataInput::ReadDouble (  ) 

Read a double precision number from the stream.

array<double> ^ GemStone::GemFire::Cache::Generic::DataInput::ReadDoubleArray (  ) 

Read a double array from the stream.

float GemStone::GemFire::Cache::Generic::DataInput::ReadFloat (  ) 

Read a floating point number from the stream.

array<float> ^ GemStone::GemFire::Cache::Generic::DataInput::ReadFloatArray (  ) 

Read a float array from the stream.

int16_t GemStone::GemFire::Cache::Generic::DataInput::ReadInt16 (  ) 

Read a 16-bit integer from the stream.

int32_t GemStone::GemFire::Cache::Generic::DataInput::ReadInt32 (  ) 

Read a 32-bit integer from the stream.

int64_t GemStone::GemFire::Cache::Generic::DataInput::ReadInt64 (  ) 

Read a 64-bit integer from the stream.

array<Int32> ^ GemStone::GemFire::Cache::Generic::DataInput::ReadIntArray (  ) 

Read a int array from the stream.

array<Int64> ^ GemStone::GemFire::Cache::Generic::DataInput::ReadLongArray (  ) 

Read a long array from the stream.

Object ^ GemStone::GemFire::Cache::Generic::DataInput::ReadObject (  ) 

Read a serializable object from the data. Null objects are handled.

List<Object^> ^ GemStone::GemFire::Cache::Generic::DataInput::ReadObjectArray (  ) 

Read a object array from the stream from the stream.

SByte GemStone::GemFire::Cache::Generic::DataInput::ReadSByte (  ) 

Read a signed byte from the stream.

array<SByte> ^ GemStone::GemFire::Cache::Generic::DataInput::ReadSBytes (  ) 

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

array<SByte> ^ GemStone::GemFire::Cache::Generic::DataInput::ReadSBytesOnly ( uint32_t  len  ) 

Read the given number of signed bytes from the stream.

Parameters:
len Number of signed bytes to read.

array<Int16> ^ GemStone::GemFire::Cache::Generic::DataInput::ReadShortArray (  ) 

Read a short int array from the stream.

String ^ GemStone::GemFire::Cache::Generic::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.

String ^ GemStone::GemFire::Cache::Generic::DataInput::ReadUTFHuge (  ) 

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

void GemStone::GemFire::Cache::Generic::DataInput::Reset (  ) 

Reset the cursor to the start of buffer.

void GemStone::GemFire::Cache::Generic::DataInput::RewindCursor ( int32_t  offset  ) 

Rewind the cursor of the buffer by the given offset.

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

void GemStone::GemFire::Cache::Generic::Internal::UMWrap< gemfire::DataInput >::SetPtr ( gemfire::DataInput *  nativeptr,
bool  own 
) [inline, protected, inherited]

Used to set the native pointer to a new object. This should only be used when you know that the underlying object is NULL or you do not own it.


Property Documentation

uint32_t GemStone::GemFire::Cache::Generic::DataInput::BytesRead [get]

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

uint32_t GemStone::GemFire::Cache::Generic::DataInput::BytesRemaining [get]

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

IntPtr GemStone::GemFire::Cache::Generic::DataInput::NativeIntPtr [get]

Get the underlying native unmanaged pointer.

bool GemStone::GemFire::Cache::Generic::Internal::UMWrap< gemfire::DataInput >::Own [get, set, protected, inherited]

Get or set the ownership of this object.

Returns:
True if the native object is owned by this object.


GemFire C++ Cache .NET API Documentation