TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

interface ISerializer in Tinman.Core.IO.Serialization

Base interface for classes that read and write data during conversion of ISerializable objects to binary data streams.

interface ISerializer extends IBinaryReader
  IBinaryWriter
  base of SerializerBase

Methods

Flush

Flushes all cached data.

method Flush ()
inherited IFlushable.Flush

Remarks:

Performing a flush may result in I/O work. Depending on the semantics of the implementing class, this work may need to be wrapped in special Begin / End method calls. See the documentation of the implementing classes for details.

In case this object represents a read-only resource, calling the Flush method has no effect.

Read

Reads a number of bytes from the stream.

method Read (ByteBuffer bytes)
type int32
params bytes [not-null] The buffer where the read bytes will be stored.
returns [>=0] The number of bytes the have been read.
inherited IBinaryReader.Read

Remarks:

The number of bytes that are read from the stream may be less than the number of Remaining bytes in the given ByteBuffer, for any arbitrary reason.

Exceptions:

ReadAll

Reads a number of bytes from the stream.

method ReadAll (ByteBuffer bytes)
params bytes [not-null] The buffer where the read bytes will be stored.
inherited IBinaryReader.ReadAll

Remarks:

The number of bytes that are read from the stream will be equal to the number of Remaining bytes in the given ByteBuffer.

Exceptions:

ReadBool

Returns a data token of the object being deserialized.

method ReadBool ()
type bool
returns The data token value.

ReadBoolArray

Returns a data token of the object being deserialized.

method ReadBoolArray ()
type bool[]
returns The data token value.

ReadByteBuffer

Returns a data token of the object being deserialized.

[OwnerReturn]
method ReadByteBuffer ()
type ByteBuffer
returns The data token value.

ReadFloat32

Reads a 32-bit floating point value from the data stream.

method ReadFloat32 ()
type float32
returns The read value.
inherited IBinaryReader.ReadFloat32

Exceptions:

ReadFloat32Array

Returns a data token of the object being deserialized.

method ReadFloat32Array ()
type float32[]
returns The data token value.

ReadFloat32s

Reads 32-bit floating point values from the data stream.

method ReadFloat32s (float32[] array, int32 offset, int32 count)
params array [not-null] The output array.
  offset [>=0] Index of first array element to write.
  count [>=0] Number of values to read.
returns The read value.
inherited IBinaryReader.ReadFloat32s

Exceptions:

ReadFloat64

Reads a 64-bit floating point value from the data stream.

method ReadFloat64 ()
type float64
returns The read value.
inherited IBinaryReader.ReadFloat64

Exceptions:

ReadFloat64Array

Returns a data token of the object being deserialized.

method ReadFloat64Array ()
type float64[]
returns The data token value.

ReadFloat64s

Reads 64-bit floating point values from the data stream.

method ReadFloat64s (float64[] array, int32 offset, int32 count)
params array [not-null] The output array.
  offset [>=0] Index of first array element to write.
  count [>=0] Number of values to read.
returns The read value.
inherited IBinaryReader.ReadFloat64s

Exceptions:

ReadInt16

Reads a signed 16-bit integer value from the data stream using.

method ReadInt16 ()
type int16
returns The read value.
inherited IBinaryReader.ReadInt16

Exceptions:

ReadInt16Array

Returns a data token of the object being deserialized.

method ReadInt16Array ()
type int16[]
returns The data token value.

ReadInt16s

Reads signed 16-bit integer value values from the data stream.

method ReadInt16s (int16[] array, int32 offset, int32 count)
params array [not-null] The output array.
  offset [>=0] Index of first array element to write.
  count [>=0] Number of values to read.
returns The read value.
inherited IBinaryReader.ReadInt16s

Exceptions:

ReadInt32

Reads a signed 32-bit integer value from the data stream.

method ReadInt32 ()
type int32
returns The read value.
inherited IBinaryReader.ReadInt32

Exceptions:

ReadInt32Array

Returns a data token of the object being deserialized.

method ReadInt32Array ()
type int32[]
returns The data token value.

ReadInt32s

Reads signed 32-bit integer value values from the data stream.

method ReadInt32s (int32[] array, int32 offset, int32 count)
params array [not-null] The output array.
  offset [>=0] Index of first array element to write.
  count [>=0] Number of values to read.
returns The read value.
inherited IBinaryReader.ReadInt32s

Exceptions:

ReadInt64

Reads a signed 64-bit integer value from the data stream.

method ReadInt64 ()
type int64
returns The read value.
inherited IBinaryReader.ReadInt64

Exceptions:

ReadInt64Array

Returns a data token of the object being deserialized.

method ReadInt64Array ()
type int64[]
returns The data token value.

ReadInt64s

Reads signed 64-bit integer value values from the data stream.

method ReadInt64s (int64[] array, int32 offset, int32 count)
params array [not-null] The output array.
  offset [>=0] Index of first array element to write.
  count [>=0] Number of values to read.
returns The read value.
inherited IBinaryReader.ReadInt64s

Exceptions:

ReadInt8

Reads an 8-bit value from the stream.

method ReadInt8 ()
type int8
returns The read value.
inherited IBinaryReader.ReadInt8

Exceptions:

ReadInt8Array

Returns a data token of the object being deserialized.

method ReadInt8Array ()
type int8[]
returns The data token value.

ReadInt8s

Reads signed 8-bit integer value values from the data stream.

method ReadInt8s (int8[] array, int32 offset, int32 count)
params array [not-null] The output array.
  offset [>=0] Index of first array element to write.
  count [>=0] Number of values to read.
returns The read value.
inherited IBinaryReader.ReadInt8s

Exceptions:

ReadObject

Returns a data token of the object being deserialized.

[OwnerReturn]
method ReadObject ()
type ISerializable
returns The data token value.

ReadString

Returns a data token of the object being deserialized.

method ReadString ()
type string
returns The data token value.

ReadUInt16

Reads an unsigned 16-bit integer value from the data stream.

method ReadUInt16 ()
type int32
returns The read value.
inherited IBinaryReader.ReadUInt16

Exceptions:

ReadUInt32

Reads an unsigned 32-bit integer value from the data stream.

method ReadUInt32 ()
type int64
returns The read value.
inherited IBinaryReader.ReadUInt32

Exceptions:

ReadUInt8

Reads an unsigned 8-bit integer from the data stream.

method ReadUInt8 ()
type int32
returns The read value.
inherited IBinaryReader.ReadUInt8

Exceptions:

TryReadUInt8

Reads an unsigned 8-bit value from the stream.

method TryReadUInt8 ()
type int32
returns [-1..255] The unsigned 8-bit value or -1 if the end of the stream has been reached.
inherited IBinaryReader.TryReadUInt8

Write

Writes a number of bytes to the stream.

method Write (ByteBuffer bytes)
params bytes [not-null] The bytes to write.
inherited IBinaryWriter.Write

Exceptions:

WriteBool

Writes the value of a data token of the object being serialized.

method WriteBool (bool value)
params value The data token value.

WriteBoolArray

Writes the value of a data token of the object being serialized.

method WriteBoolArray (bool[] value)
params value The data token value.

Writes the value of a data token of the object being serialized.

method WriteBoolArray ([] bool[] value, int32 first, int32 count)
params value The data token value.
  first [>=0] Index of first array element to write.
  count [>=0] Number array elements to write.

WriteByteBuffer

Writes the value of a data token of the object being serialized.

method WriteByteBuffer (ByteBuffer buffer)
params buffer The data token value.

WriteFloat32

Writes a 32-bit floating point value to the data stream.

method WriteFloat32 (float32 value)
params value The value to write.
inherited IBinaryWriter.WriteFloat32

Exceptions:

WriteFloat32Array

Writes the value of a data token of the object being serialized.

method WriteFloat32Array (float32[] value)
params value The data token value.

Writes the value of a data token of the object being serialized.

method WriteFloat32Array ([] float32[] value, int32 first, int32 count)
params value The data token value.
  first [>=0] Index of first array element to write.
  count [>=0] Number array elements to write.

WriteFloat32s

Writes 32-bit floating point values to the data stream.

method WriteFloat32s (float32[] array, int32 offset, int32 count)
params array [not-null] The input array.
  offset [>=0] Index of first array element to read.
  count [>=0] Number of values to write.
returns The read value.
inherited IBinaryWriter.WriteFloat32s

Exceptions:

WriteFloat64

Writes a 64-bit floating point value to the data stream.

method WriteFloat64 (float64 value)
params value The value to write.
inherited IBinaryWriter.WriteFloat64

Exceptions:

WriteFloat64Array

Writes the value of a data token of the object being serialized.

method WriteFloat64Array (float64[] value)
params value The data token value.

Writes the value of a data token of the object being serialized.

method WriteFloat64Array ([] float64[] value, int32 first, int32 count)
params value The data token value.
  first [>=0] Index of first array element to write.
  count [>=0] Number array elements to write.

WriteFloat64s

Writes 64-bit floating point values to the data stream.

method WriteFloat64s (float64[] array, int32 offset, int32 count)
params array [not-null] The input array.
  offset [>=0] Index of first array element to read.
  count [>=0] Number of values to write.
returns The read value.
inherited IBinaryWriter.WriteFloat64s

Exceptions:

WriteInt16

Writes a signed 16-bit integer value to the data stream.

method WriteInt16 (int16 value)
params value The value to write.
inherited IBinaryWriter.WriteInt16

Exceptions:

WriteInt16Array

Writes the value of a data token of the object being serialized.

method WriteInt16Array (int16[] value)
params value The data token value.

Writes the value of a data token of the object being serialized.

method WriteInt16Array ([] int16[] value, int32 first, int32 count)
params value The data token value.
  first [>=0] Index of first array element to write.
  count [>=0] Number array elements to write.

WriteInt16s

Writes signed 16-bit integer values to the data stream.

method WriteInt16s (int16[] array, int32 offset, int32 count)
params array [not-null] The input array.
  offset [>=0] Index of first array element to read.
  count [>=0] Number of values to write.
returns The read value.
inherited IBinaryWriter.WriteInt16s

Exceptions:

WriteInt32

Writes a signed 32-bit integer value to the data stream.

method WriteInt32 (int32 value)
params value The value to write.
inherited IBinaryWriter.WriteInt32

Exceptions:

WriteInt32Array

Writes the value of a data token of the object being serialized.

method WriteInt32Array (int32[] value)
params value The data token value.

Writes the value of a data token of the object being serialized.

method WriteInt32Array ([] int32[] value, int32 first, int32 count)
params value The data token value.
  first [>=0] Index of first array element to write.
  count [>=0] Number array elements to write.

WriteInt32s

Writes signed 32-bit integer values to the data stream.

method WriteInt32s (int32[] array, int32 offset, int32 count)
params array [not-null] The input array.
  offset [>=0] Index of first array element to read.
  count [>=0] Number of values to write.
returns The read value.
inherited IBinaryWriter.WriteInt32s

Exceptions:

WriteInt64

Writes a signed 64-bit integer value to the data stream.

method WriteInt64 (int64 value)
params value The value to write.
inherited IBinaryWriter.WriteInt64

Exceptions:

WriteInt64Array

Writes the value of a data token of the object being serialized.

method WriteInt64Array (int64[] value)
params value The data token value.

Writes the value of a data token of the object being serialized.

method WriteInt64Array ([] int64[] value, int32 first, int32 count)
params value The data token value.
  first [>=0] Index of first array element to write.
  count [>=0] Number array elements to write.

WriteInt64s

Writes signed 64-bit integer values to the data stream.

method WriteInt64s (int64[] array, int32 offset, int32 count)
params array [not-null] The input array.
  offset [>=0] Index of first array element to read.
  count [>=0] Number of values to write.
returns The read value.
inherited IBinaryWriter.WriteInt64s

Exceptions:

WriteInt8

Writes an 8-bit integer value to the stream.

method WriteInt8 (int8 value)
params value The value to write.
inherited IBinaryWriter.WriteInt8

Exceptions:

WriteInt8Array

Writes the value of a data token of the object being serialized.

method WriteInt8Array (int8[] value)
params value The data token value.

Writes the value of a data token of the object being serialized.

method WriteInt8Array ([] int8[] value, int32 first, int32 count)
params value The data token value.
  first [>=0] Index of first array element to write.
  count [>=0] Number array elements to write.

WriteInt8s

Writes signed 8-bit integer values to the data stream.

method WriteInt8s (int8[] array, int32 offset, int32 count)
params array [not-null] The input array.
  offset [>=0] Index of first array element to read.
  count [>=0] Number of values to write.
returns The read value.
inherited IBinaryWriter.WriteInt8s

Exceptions:

WriteObject

Writes the value of a data token of the object being serialized.

method WriteObject (ISerializable value)
params value The data token value.

WriteString

Writes the value of a data token of the object being serialized.

method WriteString (string value)
params value The data token value.

Extensions

ReadObjectArray

Reads an array of objects.

[OwnerReturn]
method ReadObjectArray ()
type ISerializable[]
returns The read array.

Remarks:

This method can also be used to read elements that have been written as an object collection.

ReadObjectCollection

Reads a collection of objects.

method ReadObjectCollection (IBag<ISerializable> collection)
params collection [not-null] The output collection.

Remarks:

This method can also be used to read elements that have been written as an object array.

WriteObjectArray

Writes an array of objects.

method WriteObjectArray (ISerializable[] values)
params values The object array or null.

Remarks:

This method can also be used to write elements that will be read as an object collection.

WriteObjectCollection

Writes a collection of objects.

method WriteObjectCollection (IBagConst<ISerializable> values)
params values The object collection or null.

Remarks:

This method can also be used to write elements that will be read an an object array.