UM .NET API 6.17.1

- Main Page
- Related Pages
- Packages
- Classes

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
com.latencybusters.pdm.PDMDeserializer Class Reference

Used to deserialize bytes into the appropriate type. More...

## Public Member Functions
virtual void | setByteSwap (byte[] ba, int pos, uint magic)
| Sets the flag on whether to swap bytes by comparing the magic number read in from the ba at the specified pos to the one passed in. More...
virtual bool | isByteSwap ()
| Gets whether the byteSwap flag is set. More...
virtual bool | readBoolean (byte[] ba, int pos)
| This method will use one bytes from the given byte array starting at position to create a boolean. More...
virtual sbyte | readByte (byte[] ba, int pos)
| This method will use one bytes from the given byte array starting at position to create a byte. More...
virtual byte | readUByte (byte[] ba, int pos)
| This method will use one bytes from the given byte array starting at position to create an unsigned byte (stored in a short). More...
virtual short | readShort (byte[] ba, int pos, bool byteSwap)
| This method will use two bytes from the given byte array starting at position to create a short. More...
virtual short | readShort (byte[] ba, int pos)
| This method will use two bytes from the given byte array starting at position to create a short. More...
virtual ushort | readUShort (byte[] ba, int pos, bool byteSwap)
| This method will use two bytes from the given byte array starting at position to create an unsigned short (stored as an int). More...
virtual ushort | readUShort (byte[] ba, int pos)
| This method will use two bytes from the given byte array starting at position to create an unsigned short (stored as an int). More...
virtual int | readInt (byte[] ba, int pos, bool byteSwap)
| This method will use four bytes from the given byte array starting at position to create an int. More...
virtual int | readInt (byte[] ba, int pos)
| This method will use four bytes from the given byte array starting at position to create an int. More...
virtual uint | readUInt (byte[] ba, int pos, bool byteSwap)
| This method will use four bytes from the given byte array starting at position to create an unsigned int (stored as a long). More...
virtual uint | readUInt (byte[] ba, int pos)
| This method will use four bytes from the given byte array starting at position to create an unsigned int (stored as a long). More...
virtual long | readLong (byte[] ba, int pos, bool byteSwap)
| This method will use eight bytes from the given byte array starting at position to create a long. More...
virtual long | readLong (byte[] ba, int pos)
| This method will use eight bytes from the given byte array starting at position to create a long. More...
virtual ulong | readULong (byte[] ba, int pos, bool byteSwap)
| This method will use eight bytes from the given byte array starting at position to create an unsigned long (stored in a BigInteger). More...
virtual ulong | readULong (byte[] ba, int pos)
| This method will use eight bytes from the given byte array starting at position to create an unsigned long (stored in a BigInteger). More...
virtual float | readFloat (byte[] ba, int pos, bool byteSwap)
| This method will use four bytes from the given byte array starting at position to create a float. More...
virtual float | readFloat (byte[] ba, int pos)
| This method will use four bytes from the given byte array starting at position to create a float. More...
virtual double | readDouble (byte[] ba, int pos, bool byteSwap)
| This method will use eight bytes from the given byte array starting at position to create a double. More...
virtual double | readDouble (byte[] ba, int pos)
| This method will use eight bytes from the given byte array starting at position to create a double. More...
virtual PDMDecimal | readDecimal (byte[] ba, int pos, bool byteSwap)
| This method will use nine bytes from the given byte array starting at position to create a PDMDecimal. More...
virtual PDMDecimal | readDecimal (byte[] ba, int pos)
| This method will use eight bytes from the given byte array starting at position to create a PDMDecimal. More...
virtual PDMTimestamp | readTimestamp (byte[] ba, int pos, bool byteSwap)
| This method will use eight bytes from the given byte array starting at position to create a PDMTimestamp. More...
virtual PDMTimestamp | readTimestamp (byte[] ba, int pos)
| This method will use eight bytes from the given byte array starting at position to create a PDMTimestamp. More...
virtual System.String | readString (byte[] ba, int pos, int len)
| This method will read the specified len at position pos from the byte array and create a String expecting the String to end with a byte 0. More...
virtual System.String | readUnicode (byte[] ba, int pos, int len, System.String charSet)
| This method will read the specified len at position pos from the byte array and create a unicode String expecting the String to end with a byte 0. More...
virtual System.String | readUnicode (byte[] ba, int pos, int len)
| This method will read the specified len at position pos from the byte array and create a UTF-8 unicode String expecting the String to end with a byte 0. More...
virtual void | readByteArray (byte[] ba, int pos, byte[] destByteArray)
| Copies bytes from the source byte array (ba) into the destination byte array. More...
virtual void | readByteArray (byte[] ba, int pos, byte[] destByteArray, int copyLen)
| Copies bytes from the source byte array (ba) into the destination byte array. More...
virtual byte[] | readByteArray (byte[] ba, int pos, int length)
| Creates a new byte array from the source byte array (ba) at position for the given length. More...

## Detailed Description

Used to deserialize bytes into the appropriate type.

## Member Function Documentation

virtual bool com.latencybusters.pdm.PDMDeserializer.isByteSwap | ( |  | ) |
| virtual

Gets whether the byteSwap flag is set.

Returns
  true if byteSwap flag is set

Referenced by com.latencybusters.pdm.PDMMessage.getFields().

virtual bool com.latencybusters.pdm.PDMDeserializer.readBoolean | ( | byte[] | ba,
|  | int | pos
| ) |  |
| virtual

This method will use one bytes from the given byte array starting at position to create a boolean.

Parameters

  ba | the byte array
  pos | the position to start reading

Returns
  the boolean

Referenced by com.latencybusters.pdm.PDMField.getBooleanArrayValue(), com.latencybusters.pdm.PDMField.getBooleanValue(), com.latencybusters.pdm.PDMField.isValueSet(), and com.latencybusters.pdm.PDMDefinition.parse().

virtual sbyte com.latencybusters.pdm.PDMDeserializer.readByte | ( | byte[] | ba,
|  | int | pos
| ) |  |
| virtual

This method will use one bytes from the given byte array starting at position to create a byte.

Parameters

  ba | the byte array
  pos | the position to start reading

Returns
  the byte

Referenced by com.latencybusters.pdm.PDMField.getInt8ArrayValue(), com.latencybusters.pdm.PDMField.getInt8Value(), com.latencybusters.pdm.PDMField.isValueSet(), com.latencybusters.pdm.PDMMessageHeader.parse(), com.latencybusters.pdm.PDMSegmentHeader.parse(), and com.latencybusters.pdm.PDMDefinition.parse().

virtual void com.latencybusters.pdm.PDMDeserializer.readByteArray | ( | byte[] | ba,
|  | int | pos,
|  | byte[] | destByteArray
| ) |  |
| virtual

Copies bytes from the source byte array (ba) into the destination byte array.

Parameters

  ba | the byte array
  pos | the position to start reading
  destByteArray | the destination byte array

Referenced by com.latencybusters.pdm.PDMField.getBlobArrayValue(), com.latencybusters.pdm.PDMField.getBlobValue(), com.latencybusters.pdm.PDMField.getMessageArrayValue(), com.latencybusters.pdm.PDMField.getMessageValue(), and com.latencybusters.pdm.PDMField.isValueSet().

virtual void com.latencybusters.pdm.PDMDeserializer.readByteArray | ( | byte[] | ba,
|  | int | pos,
|  | byte[] | destByteArray,
|  | int | copyLen
| ) |  |
| virtual

Copies bytes from the source byte array (ba) into the destination byte array.

Parameters

  ba | the byte array
  pos | the position to start reading
  destByteArray | the destination byte array
  copyLen | the number of bytes to copy

virtual byte [] com.latencybusters.pdm.PDMDeserializer.readByteArray | ( | byte[] | ba,
|  | int | pos,
|  | int | length
| ) |  |
| virtual

Creates a new byte array from the source byte array (ba) at position for the given length.

Parameters

  ba | the byte array
  pos | the position to start reading
  length | the length in bytes to copy

Returns
  the new byte array

virtual PDMDecimal com.latencybusters.pdm.PDMDeserializer.readDecimal | ( | byte[] | ba,
|  | int | pos,
|  | bool | byteSwap
| ) |  |
| virtual

This method will use nine bytes from the given byte array starting at position to create a PDMDecimal.

Parameters

  ba | the byte array
  pos | the position to start reading
  byteSwap | whether or not the bytes need to be swapped

Returns
  the PDMDecimal

Referenced by com.latencybusters.pdm.PDMField.getDecimalArrayValue(), com.latencybusters.pdm.PDMField.getDecimalValue(), and com.latencybusters.pdm.PDMField.isValueSet().

virtual PDMDecimal com.latencybusters.pdm.PDMDeserializer.readDecimal | ( | byte[] | ba,
|  | int | pos
| ) |  |
| virtual

This method will use eight bytes from the given byte array starting at position to create a PDMDecimal.

Parameters

  ba | the byte array
  pos | the position to start reading

Returns
  the PDMDecimal

virtual double com.latencybusters.pdm.PDMDeserializer.readDouble | ( | byte[] | ba,
|  | int | pos,
|  | bool | byteSwap
| ) |  |
| virtual

This method will use eight bytes from the given byte array starting at position to create a double.

Parameters

  ba | the byte array
  pos | the position to start reading
  byteSwap | whether or not the bytes need to be swapped

Returns
  the double

Referenced by com.latencybusters.pdm.PDMField.getDoubleArrayValue(), com.latencybusters.pdm.PDMField.getDoubleValue(), and com.latencybusters.pdm.PDMField.isValueSet().

virtual double com.latencybusters.pdm.PDMDeserializer.readDouble | ( | byte[] | ba,
|  | int | pos
| ) |  |
| virtual

This method will use eight bytes from the given byte array starting at position to create a double.

Parameters

  ba | the byte array
  pos | the position to start reading

Returns
  the double

virtual float com.latencybusters.pdm.PDMDeserializer.readFloat | ( | byte[] | ba,
|  | int | pos,
|  | bool | byteSwap
| ) |  |
| virtual

This method will use four bytes from the given byte array starting at position to create a float.

Parameters

  ba | the byte array
  pos | the position to start reading
  byteSwap | whether or not the bytes need to be swapped

Returns
  the float

Referenced by com.latencybusters.pdm.PDMField.getFloatArrayValue(), com.latencybusters.pdm.PDMField.getFloatValue(), and com.latencybusters.pdm.PDMField.isValueSet().

virtual float com.latencybusters.pdm.PDMDeserializer.readFloat | ( | byte[] | ba,
|  | int | pos
| ) |  |
| virtual

This method will use four bytes from the given byte array starting at position to create a float.

Parameters

  ba | the byte array
  pos | the position to start reading

Returns
  the float

virtual int com.latencybusters.pdm.PDMDeserializer.readInt | ( | byte[] | ba,
|  | int | pos,
|  | bool | byteSwap
| ) |  |
| virtual

This method will use four bytes from the given byte array starting at position to create an int.

Parameters

  ba | the byte array
  pos | the position to start reading
  byteSwap | whether or not the bytes need to be swapped

Returns
  the int

Referenced by com.latencybusters.pdm.PDMField.getBlobArrayValue(), com.latencybusters.pdm.PDMMessage.getFields(), com.latencybusters.pdm.PDMField.getInt32ArrayValue(), com.latencybusters.pdm.PDMField.getInt32Value(), com.latencybusters.pdm.PDMField.getMessageArrayValue(), com.latencybusters.pdm.PDMField.getStringArrayValue(), com.latencybusters.pdm.PDMField.isValueSet(), com.latencybusters.pdm.PDMOffsetTable.parse(), com.latencybusters.pdm.PDMMessageHeader.parse(), com.latencybusters.pdm.PDMSegmentHeader.parse(), and com.latencybusters.pdm.PDMDefinition.parse().

virtual int com.latencybusters.pdm.PDMDeserializer.readInt | ( | byte[] | ba,
|  | int | pos
| ) |  |
| virtual

This method will use four bytes from the given byte array starting at position to create an int.

Parameters

  ba | the byte array
  pos | the position to start reading

Returns
  the int

virtual long com.latencybusters.pdm.PDMDeserializer.readLong | ( | byte[] | ba,
|  | int | pos,
|  | bool | byteSwap
| ) |  |
| virtual

This method will use eight bytes from the given byte array starting at position to create a long.

Parameters

  ba | the byte array
  pos | the position to start reading
  byteSwap | whether or not the bytes need to be swapped

Returns
  the long

Referenced by com.latencybusters.pdm.PDMField.getInt64ArrayValue(), com.latencybusters.pdm.PDMField.getInt64Value(), and com.latencybusters.pdm.PDMField.isValueSet().

virtual long com.latencybusters.pdm.PDMDeserializer.readLong | ( | byte[] | ba,
|  | int | pos
| ) |  |
| virtual

This method will use eight bytes from the given byte array starting at position to create a long.

Parameters

  ba | the byte array
  pos | the position to start reading

Returns
  the long

virtual short com.latencybusters.pdm.PDMDeserializer.readShort | ( | byte[] | ba,
|  | int | pos,
|  | bool | byteSwap
| ) |  |
| virtual

This method will use two bytes from the given byte array starting at position to create a short.

Parameters

  ba | the byte array
  pos | the position to start reading
  byteSwap | whether or not the bytes need to be swapped

Returns
  the short

Referenced by com.latencybusters.pdm.PDMField.getInt16ArrayValue(), com.latencybusters.pdm.PDMField.getInt16Value(), com.latencybusters.pdm.PDMField.isValueSet(), and com.latencybusters.pdm.PDMSegmentHeader.parse().

virtual short com.latencybusters.pdm.PDMDeserializer.readShort | ( | byte[] | ba,
|  | int | pos
| ) |  |
| virtual

This method will use two bytes from the given byte array starting at position to create a short.

Parameters

  ba | the byte array
  pos | the position to start reading

Returns
  the short

virtual System.String com.latencybusters.pdm.PDMDeserializer.readString | ( | byte[] | ba,
|  | int | pos,
|  | int | len
| ) |  |
| virtual

This method will read the specified len at position pos from the byte array and create a String expecting the String to end with a byte 0.

Parameters

  ba | the byte array
  pos | the position to start reading
  len | the length of the string in bytes

Returns
  the String

Referenced by com.latencybusters.pdm.PDMField.getStringArrayValue(), com.latencybusters.pdm.PDMField.getStringValue(), and com.latencybusters.pdm.PDMField.isValueSet().

virtual PDMTimestamp com.latencybusters.pdm.PDMDeserializer.readTimestamp | ( | byte[] | ba,
|  | int | pos,
|  | bool | byteSwap
| ) |  |
| virtual

This method will use eight bytes from the given byte array starting at position to create a PDMTimestamp.

Parameters

  ba | the byte array
  pos | the position to start reading
  byteSwap | whether or not the bytes need to be swapped

Returns
  the PDMTimestamp

Referenced by com.latencybusters.pdm.PDMField.getTimestampArrayValue(), com.latencybusters.pdm.PDMField.getTimestampValue(), and com.latencybusters.pdm.PDMField.isValueSet().

virtual PDMTimestamp com.latencybusters.pdm.PDMDeserializer.readTimestamp | ( | byte[] | ba,
|  | int | pos
| ) |  |
| virtual

This method will use eight bytes from the given byte array starting at position to create a PDMTimestamp.

Parameters

  ba | the byte array
  pos | the position to start reading

Returns
  the PDMTimestamp

virtual byte com.latencybusters.pdm.PDMDeserializer.readUByte | ( | byte[] | ba,
|  | int | pos
| ) |  |
| virtual

This method will use one bytes from the given byte array starting at position to create an unsigned byte (stored in a short).

Parameters

  ba | the byte array
  pos | the position to start reading

Returns
  the unsigned byte

Referenced by com.latencybusters.pdm.PDMField.getUInt8ArrayValue(), com.latencybusters.pdm.PDMField.getUInt8Value(), and com.latencybusters.pdm.PDMField.isValueSet().

virtual uint com.latencybusters.pdm.PDMDeserializer.readUInt | ( | byte[] | ba,
|  | int | pos,
|  | bool | byteSwap
| ) |  |
| virtual

This method will use four bytes from the given byte array starting at position to create an unsigned int (stored as a long).

Parameters

  ba | the byte array
  pos | the position to start reading
  byteSwap | whether or not the bytes need to be swapped

Returns
  the unsigned int

Referenced by com.latencybusters.pdm.PDMField.getUInt32ArrayValue(), com.latencybusters.pdm.PDMField.getUInt32Value(), and com.latencybusters.pdm.PDMField.isValueSet().

virtual uint com.latencybusters.pdm.PDMDeserializer.readUInt | ( | byte[] | ba,
|  | int | pos
| ) |  |
| virtual

This method will use four bytes from the given byte array starting at position to create an unsigned int (stored as a long).

Parameters

  ba | the byte array
  pos | the position to start reading

Returns
  the unsigned int

virtual ulong com.latencybusters.pdm.PDMDeserializer.readULong | ( | byte[] | ba,
|  | int | pos,
|  | bool | byteSwap
| ) |  |
| virtual

This method will use eight bytes from the given byte array starting at position to create an unsigned long (stored in a BigInteger).

Parameters

  ba | the byte array
  pos | the position to start reading
  byteSwap | whether or not the bytes need to be swapped

Returns
  the unsigned long

Referenced by com.latencybusters.pdm.PDMField.getUInt64ArrayValue(), com.latencybusters.pdm.PDMField.getUInt64Value(), and com.latencybusters.pdm.PDMField.isValueSet().

virtual ulong com.latencybusters.pdm.PDMDeserializer.readULong | ( | byte[] | ba,
|  | int | pos
| ) |  |
| virtual

This method will use eight bytes from the given byte array starting at position to create an unsigned long (stored in a BigInteger).

Parameters

  ba | the byte array
  pos | the position to start reading

Returns
  the unsigned long

virtual System.String com.latencybusters.pdm.PDMDeserializer.readUnicode | ( | byte[] | ba,
|  | int | pos,
|  | int | len,
|  | System.String | charSet
| ) |  |
| virtual

This method will read the specified len at position pos from the byte array and create a unicode String expecting the String to end with a byte 0.

UnsupportedEncodingException

Parameters

  ba | the byte array
  pos | the position to start reading
  len | the length of the string in bytes
  charSet | the character set

Returns
  the String

Referenced by com.latencybusters.pdm.PDMField.getStringArrayValue(), com.latencybusters.pdm.PDMField.getStringValue(), and com.latencybusters.pdm.PDMField.isValueSet().

virtual System.String com.latencybusters.pdm.PDMDeserializer.readUnicode | ( | byte[] | ba,
|  | int | pos,
|  | int | len
| ) |  |
| virtual

This method will read the specified len at position pos from the byte array and create a UTF-8 unicode String expecting the String to end with a byte 0.

UnsupportedEncodingException

Parameters

  ba | the byte array
  pos | the position to start reading
  len | the length of the string in bytes

Returns
  the String

virtual ushort com.latencybusters.pdm.PDMDeserializer.readUShort | ( | byte[] | ba,
|  | int | pos,
|  | bool | byteSwap
| ) |  |
| virtual

This method will use two bytes from the given byte array starting at position to create an unsigned short (stored as an int).

Parameters

  ba | the byte array
  pos | the position to start reading
  byteSwap | whether or not the bytes need to be swapped

Returns
  the unsigned short

Referenced by com.latencybusters.pdm.PDMField.getUInt16ArrayValue(), com.latencybusters.pdm.PDMField.getUInt16Value(), and com.latencybusters.pdm.PDMField.isValueSet().

virtual ushort com.latencybusters.pdm.PDMDeserializer.readUShort | ( | byte[] | ba,
|  | int | pos
| ) |  |
| virtual

This method will use two bytes from the given byte array starting at position to create an unsigned short (stored as an int).

Parameters

  ba | the byte array
  pos | the position to start reading

Returns
  the unsigned short

virtual void com.latencybusters.pdm.PDMDeserializer.setByteSwap | ( | byte[] | ba,
|  | int | pos,
|  | uint | magic
| ) |  |
| virtual

Sets the flag on whether to swap bytes by comparing the magic number read in from the ba at the specified pos to the one passed in.

Parameters

  ba | the byte array
  pos | the position to start reading
  magic | the magic number to compare against

Referenced by com.latencybusters.pdm.PDMMessageHeader.parse().

The documentation for this class was generated from the following file:

- PDMDeserializer.cs