GemStone::GemFire::Cache::DataOutput Class Reference


Detailed Description

Provides operations for writing primitive data values, and user-defined objects implementing IGFSerializable, to a byte stream. This class is intentionally not thread safe.

Public Member Functions

void AdvanceCursor (uint32_t offset)
 DataOutput ()
array< Byte >^ GetBuffer ()
void Reset ()
void RewindCursor (uint32_t offset)
void WriteArrayLen (int32_t len)
void WriteASCIIHuge (String^ value)
void WriteBoolean (bool value)
void WriteByte (Byte value)
void WriteBytes (array< Byte >^bytes)
void WriteBytes (array< Byte >^bytes, int32_t len)
void WriteBytesOnly (array< Byte >^bytes)
void WriteBytesOnly (array< Byte >^bytes, uint32_t len)
void WriteDouble (double value)
void WriteFloat (float value)
void WriteInt16 (int16_t value)
void WriteInt32 (int32_t value)
void WriteInt64 (int64_t value)
void WriteObject (GemStone::GemFire::Cache::Serializable^ obj)
void WriteObject (IGFSerializable^ obj)
void WriteSByte (SByte value)
void WriteSBytes (array< SByte >^bytes)
void WriteSBytes (array< SByte >^bytes, int32_t len)
void WriteSBytesOnly (array< SByte >^bytes)
void WriteSBytesOnly (array< SByte >^bytes, uint32_t len)
void WriteUInt16 (uint16_t value)
void WriteUInt32 (uint32_t value)
void WriteUInt64 (uint64_t value)
void WriteUTF (String^ value)
void WriteUTFHuge (String^ value)

Properties

uint32_t BufferLength [get]
IntPtr NativeIntPtr [get]

Constructor & Destructor Documentation

GemStone::GemFire::Cache::DataOutput::DataOutput (  )  [inline]

Default constructor.


Member Function Documentation

void GemStone::GemFire::Cache::DataOutput::AdvanceCursor ( uint32_t  offset  ) 

Advance the buffer cursor by the given offset.

Parameters:
offset The offset by which to advance the cursor.

array<Byte> ^ GemStone::GemFire::Cache::DataOutput::GetBuffer (  ) 

Get a copy of the current buffer.

void GemStone::GemFire::Cache::DataOutput::Reset (  ) 

Reset the cursor to the start of the buffer.

void GemStone::GemFire::Cache::DataOutput::RewindCursor ( uint32_t  offset  ) 

Rewind the buffer cursor by the given offset.

Parameters:
offset The offset by which to rewind the cursor.

void GemStone::GemFire::Cache::DataOutput::WriteArrayLen ( int32_t  len  ) 

Write length of the array to the DataOutput.

Parameters:
len Array len to write.

void GemStone::GemFire::Cache::DataOutput::WriteASCIIHuge ( String^   value  ) 

Write a string(only ASCII char) to DataOutput. Length should be more than 2^16 -1.

Parameters:
value The UTF encoded string to write.

void GemStone::GemFire::Cache::DataOutput::WriteBoolean ( bool  value  ) 

Write a boolean value to the DataOutput.

Parameters:
value The boolean value to write.

void GemStone::GemFire::Cache::DataOutput::WriteByte ( Byte  value  ) 

Write a byte to the DataOutput.

Parameters:
value The byte to write.

void GemStone::GemFire::Cache::DataOutput::WriteBytes ( array< Byte >^  bytes  )  [inline]

Write an array of bytes to the DataOutput.

Parameters:
bytes The array of bytes to write.

void GemStone::GemFire::Cache::DataOutput::WriteBytes ( array< Byte >^  bytes,
int32_t  len 
)

Write a given length of bytes to the DataOutput.

Parameters:
bytes The array of bytes to write.
len The number of bytes from the start of array to write.

void GemStone::GemFire::Cache::DataOutput::WriteBytesOnly ( array< Byte >^  bytes  )  [inline]

Write an array of bytes without its length to the DataOutput.

Parameters:
bytes The array of bytes to write.

void GemStone::GemFire::Cache::DataOutput::WriteBytesOnly ( array< Byte >^  bytes,
uint32_t  len 
)

Write a given length of bytes without its length to the DataOutput.

Parameters:
bytes The array of bytes to write.
len The number of bytes from the start of array to write.

void GemStone::GemFire::Cache::DataOutput::WriteDouble ( double  value  ) 

Write a double precision real number to the DataOutput.

Parameters:
value The double precision real number to write.

void GemStone::GemFire::Cache::DataOutput::WriteFloat ( float  value  ) 

Write a float to the DataOutput.

Parameters:
value The float value to write.

void GemStone::GemFire::Cache::DataOutput::WriteInt16 ( int16_t  value  ) 

Write a 16-bit integer to the DataOutput.

Parameters:
value The 16-bit integer to write.

void GemStone::GemFire::Cache::DataOutput::WriteInt32 ( int32_t  value  ) 

Write a 32-bit integer to the DataOutput.

Parameters:
value The 32-bit integer to write.

void GemStone::GemFire::Cache::DataOutput::WriteInt64 ( int64_t  value  ) 

Write a 64-bit integer to the DataOutput.

Parameters:
value The 64-bit integer to write.

void GemStone::GemFire::Cache::DataOutput::WriteObject ( GemStone::GemFire::Cache::Serializable^   obj  ) 

Write a Serializable object to the DataOutput. This is provided to conveniently pass primitive types (like string) that shall be implicitly converted to corresponding IGFSerializable wrapper types.

Parameters:
obj The object to write.

void GemStone::GemFire::Cache::DataOutput::WriteObject ( IGFSerializable^   obj  ) 

Write an IGFSerializable object to the DataOutput.

Parameters:
obj The object to write.

void GemStone::GemFire::Cache::DataOutput::WriteSByte ( SByte  value  ) 

Write a signed byte to the DataOutput.

Parameters:
value The signed byte to write.

void GemStone::GemFire::Cache::DataOutput::WriteSBytes ( array< SByte >^  bytes  )  [inline]

Write an array of signed bytes to the DataOutput.

Parameters:
bytes The array of signed bytes to write.

void GemStone::GemFire::Cache::DataOutput::WriteSBytes ( array< SByte >^  bytes,
int32_t  len 
)

Write a given length of signed bytes to the DataOutput.

Parameters:
bytes The array of signed bytes to write.
len The number of bytes from the start of array to write.

void GemStone::GemFire::Cache::DataOutput::WriteSBytesOnly ( array< SByte >^  bytes  )  [inline]

Write an array of signed bytes without its length to the DataOutput.

Parameters:
bytes The array of signed bytes to write.

void GemStone::GemFire::Cache::DataOutput::WriteSBytesOnly ( array< SByte >^  bytes,
uint32_t  len 
)

Write a given length of signed bytes without its length to the DataOutput.

Parameters:
bytes The array of signed bytes to write.
len The number of bytes from the start of array to write.

void GemStone::GemFire::Cache::DataOutput::WriteUInt16 ( uint16_t  value  ) 

Write an unsigned short integer (int16_t) to the DataOutput.

Parameters:
value The unsigned 16-bit integer to write.

void GemStone::GemFire::Cache::DataOutput::WriteUInt32 ( uint32_t  value  ) 

Write an unsigned 32-bit integer to the DataOutput.

Parameters:
value The unsigned 32-bit integer to write.

void GemStone::GemFire::Cache::DataOutput::WriteUInt64 ( uint64_t  value  ) 

Write an unsigned 64-bit integer to the DataOutput.

Parameters:
value The unsigned 64-bit integer to write.

void GemStone::GemFire::Cache::DataOutput::WriteUTF ( String^   value  ) 

Write a string using java-modified UTF-8 encoding to DataOutput. The maximum length supported is 2^16-1 beyond which the string shall be truncated.

Parameters:
value The UTF encoded string to write.

void GemStone::GemFire::Cache::DataOutput::WriteUTFHuge ( String^   value  ) 

Write a string using java-modified UTF-8 encoding to DataOutput. Length should be more than 2^16 -1.

Parameters:
value The UTF encoded string to write.


Property Documentation

uint32_t GemStone::GemFire::Cache::DataOutput::BufferLength [get]

Get the length of current data in the buffer.

IntPtr GemStone::GemFire::Cache::DataOutput::NativeIntPtr [get]

Get the underlying native unmanaged pointer.


GemFire C++ Cache .NET API Documentation