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 offset)
 DataOutput ()
array< Byte >^ GetBuffer ()
void Reset ()
void RewindCursor (UInt32 offset)
void WriteBoolean (Boolean value)
void WriteByte (Byte value)
void WriteBytes (array< Byte >^bytes)
void WriteBytes (array< Byte >^bytes, Int32 len)
void WriteBytesOnly (array< Byte >^bytes)
void WriteBytesOnly (array< Byte >^bytes, UInt32 len)
void WriteDouble (Double value)
void WriteFloat (Single value)
void WriteInt16 (Int16 value)
void WriteInt32 (Int32 value)
void WriteInt64 (Int64 value)
void WriteObject (Serializable^ obj)
void WriteObject (IGFSerializable^ obj)
void WriteSByte (SByte value)
void WriteSBytes (array< SByte >^bytes)
void WriteSBytes (array< SByte >^bytes, Int32 len)
void WriteSBytesOnly (array< SByte >^bytes)
void WriteSBytesOnly (array< SByte >^bytes, UInt32 len)
void WriteUInt16 (UInt16 value)
void WriteUInt32 (UInt32 value)
void WriteUInt64 (UInt64 value)
void WriteUTF (String^ value)
void WriteUTFHuge (String^ value)

Properties

UInt32 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  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  offset  ) 

Rewind the buffer cursor by the given offset.

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

void GemStone::GemFire::Cache::DataOutput::WriteBoolean ( Boolean  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  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  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 ( Single  value  ) 

Write a float to the DataOutput.

Parameters:
value The float value to write.

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

Write a 16-bit integer to the DataOutput.

Parameters:
value The 16-bit integer to write.

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

Write a 32-bit integer to the DataOutput.

Parameters:
value The 32-bit integer to write.

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

Write a 64-bit integer to the DataOutput.

Parameters:
value The 64-bit integer to write.

void GemStone::GemFire::Cache::DataOutput::WriteObject ( 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  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  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  value  ) 

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

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

void GemStone::GemFire::Cache::DataOutput::WriteUInt32 ( UInt32  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  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.

Parameters:
value The UTF encoded string to write.


Property Documentation

UInt32 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