UM Java API
6.16.1
|
Public Member Functions | |
void | setByteSwap (byte[] ba, int pos, int magic) |
boolean | isByteSwap () |
boolean | readBoolean (byte[] ba, int pos) |
byte | readByte (byte[] ba, int pos) |
short | readUByte (byte[] ba, int pos) |
short | readShort (byte[] ba, int pos, boolean byteSwap) |
short | readShort (byte[] ba, int pos) |
int | readUShort (byte[] ba, int pos, boolean byteSwap) |
int | readUShort (byte[] ba, int pos) |
int | readInt (byte[] ba, int pos, boolean byteSwap) |
int | readInt (byte[] ba, int pos) |
long | readUInt (byte[] ba, int pos, boolean byteSwap) |
long | readUInt (byte[] ba, int pos) |
long | readLong (byte[] ba, int pos, boolean byteSwap) |
long | readLong (byte[] ba, int pos) |
BigInteger | readULong (byte[] ba, int pos, boolean byteSwap) |
BigInteger | readULong (byte[] ba, int pos) |
float | readFloat (byte[] ba, int pos, boolean byteSwap) |
float | readFloat (byte[] ba, int pos) |
double | readDouble (byte[] ba, int pos, boolean byteSwap) |
double | readDouble (byte[] ba, int pos) |
PDMDecimal | readDecimal (byte[] ba, int pos, boolean byteSwap) |
PDMDecimal | readDecimal (byte[] ba, int pos) |
PDMTimestamp | readTimestamp (byte[] ba, int pos, boolean byteSwap) |
PDMTimestamp | readTimestamp (byte[] ba, int pos) |
String | readString (byte[] ba, int pos, int len) |
String | readUnicode (byte[] ba, int pos, int len, String charSet) throws UnsupportedEncodingException |
String | readUnicode (byte[] ba, int pos, int len) throws UnsupportedEncodingException |
void | readByteArray (byte[] ba, int pos, final byte[] destByteArray) |
void | readByteArray (byte[] ba, int pos, final byte[] destByteArray, int copyLen) |
byte[] | readByteArray (byte[] ba, int pos, int length) |
Used to deserialize bytes into the appropriate type
boolean com.latencybusters.pdm.PDMDeserializer.isByteSwap | ( | ) |
Gets whether the byteSwap flag is set
Referenced by com.latencybusters.pdm.PDMMessage.getMessageLen().
boolean com.latencybusters.pdm.PDMDeserializer.readBoolean | ( | byte[] | ba, |
int | pos | ||
) |
This method will use one bytes from the given byte array starting at position to create a boolean.
ba | the byte array |
pos | the position to start reading |
Referenced by com.latencybusters.pdm.PDMField.getBooleanArrayValue(), com.latencybusters.pdm.PDMField.getBooleanValue(), com.latencybusters.pdm.PDMFieldInfo.parse(), and com.latencybusters.pdm.PDMDefinition.parse().
byte com.latencybusters.pdm.PDMDeserializer.readByte | ( | byte[] | ba, |
int | pos | ||
) |
This method will use one bytes from the given byte array starting at position to create a byte.
ba | the byte array |
pos | the position to start reading |
Referenced by com.latencybusters.pdm.PDMField.getInt8ArrayValue(), com.latencybusters.pdm.PDMField.getInt8Value(), com.latencybusters.pdm.PDMDefinition.parse(), com.latencybusters.pdm.PDMDeserializer.readDecimal(), and com.latencybusters.pdm.PDMDeserializer.readUByte().
void com.latencybusters.pdm.PDMDeserializer.readByteArray | ( | byte[] | ba, |
int | pos, | ||
final byte[] | destByteArray | ||
) |
Copies bytes from the source byte array (ba) into the destination byte array
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(), and com.latencybusters.pdm.PDMField.getMessageValue().
void com.latencybusters.pdm.PDMDeserializer.readByteArray | ( | byte[] | ba, |
int | pos, | ||
final byte[] | destByteArray, | ||
int | copyLen | ||
) |
Copies bytes from the source byte array (ba) into the destination byte array
ba | the byte array |
pos | the position to start reading |
destByteArray | the destination byte array |
copyLen | the number of bytes to copy |
byte [] com.latencybusters.pdm.PDMDeserializer.readByteArray | ( | byte[] | ba, |
int | pos, | ||
int | length | ||
) |
Creates a new byte array from the source byte array (ba) at position for the given length
ba | the byte array |
pos | the position to start reading |
length | the length in bytes to copy |
PDMDecimal com.latencybusters.pdm.PDMDeserializer.readDecimal | ( | byte[] | ba, |
int | pos, | ||
boolean | byteSwap | ||
) |
This method will use nine bytes from the given byte array starting at position to create a PDMDecimal.
ba | the byte array |
pos | the position to start reading |
byteSwap | whether or not the bytes need to be swapped |
References com.latencybusters.pdm.PDMDeserializer.readByte(), and com.latencybusters.pdm.PDMDeserializer.readLong().
Referenced by com.latencybusters.pdm.PDMField.getDecimalArrayValue(), com.latencybusters.pdm.PDMField.getDecimalValue(), and com.latencybusters.pdm.PDMDeserializer.readDecimal().
PDMDecimal com.latencybusters.pdm.PDMDeserializer.readDecimal | ( | byte[] | ba, |
int | pos | ||
) |
This method will use eight bytes from the given byte array starting at position to create a PDMDecimal.
ba | the byte array |
pos | the position to start reading |
References com.latencybusters.pdm.PDMDeserializer.readDecimal().
double com.latencybusters.pdm.PDMDeserializer.readDouble | ( | byte[] | ba, |
int | pos, | ||
boolean | byteSwap | ||
) |
This method will use eight bytes from the given byte array starting at position to create a double.
ba | the byte array |
pos | the position to start reading |
byteSwap | whether or not the bytes need to be swapped |
References com.latencybusters.pdm.PDMDeserializer.readLong().
Referenced by com.latencybusters.pdm.PDMField.getDoubleArrayValue(), and com.latencybusters.pdm.PDMField.getDoubleValue().
double com.latencybusters.pdm.PDMDeserializer.readDouble | ( | byte[] | ba, |
int | pos | ||
) |
This method will use eight bytes from the given byte array starting at position to create a double.
ba | the byte array |
pos | the position to start reading |
References com.latencybusters.pdm.PDMDeserializer.readLong().
float com.latencybusters.pdm.PDMDeserializer.readFloat | ( | byte[] | ba, |
int | pos, | ||
boolean | byteSwap | ||
) |
This method will use four bytes from the given byte array starting at position to create a float.
ba | the byte array |
pos | the position to start reading |
byteSwap | whether or not the bytes need to be swapped |
References com.latencybusters.pdm.PDMDeserializer.readInt().
Referenced by com.latencybusters.pdm.PDMField.getFloatArrayValue(), and com.latencybusters.pdm.PDMField.getFloatValue().
float com.latencybusters.pdm.PDMDeserializer.readFloat | ( | byte[] | ba, |
int | pos | ||
) |
This method will use four bytes from the given byte array starting at position to create a float.
ba | the byte array |
pos | the position to start reading |
References com.latencybusters.pdm.PDMDeserializer.readInt().
int com.latencybusters.pdm.PDMDeserializer.readInt | ( | byte[] | ba, |
int | pos, | ||
boolean | byteSwap | ||
) |
This method will use four bytes from the given byte array starting at position to create an int.
ba | the byte array |
pos | the position to start reading |
byteSwap | whether or not the bytes need to be swapped |
Referenced by com.latencybusters.pdm.PDMField.getBlobArrayValue(), com.latencybusters.pdm.PDMField.getInt32ArrayValue(), com.latencybusters.pdm.PDMField.getInt32Value(), com.latencybusters.pdm.PDMField.getMessageArrayValue(), com.latencybusters.pdm.PDMMessage.getMessageLen(), com.latencybusters.pdm.PDMField.getStringArrayValue(), com.latencybusters.pdm.PDMFieldInfo.parse(), com.latencybusters.pdm.PDMDefinition.parse(), com.latencybusters.pdm.PDMDeserializer.readFloat(), com.latencybusters.pdm.PDMDeserializer.readInt(), com.latencybusters.pdm.PDMDeserializer.readTimestamp(), com.latencybusters.pdm.PDMDeserializer.readUInt(), and com.latencybusters.pdm.PDMDeserializer.setByteSwap().
int com.latencybusters.pdm.PDMDeserializer.readInt | ( | byte[] | ba, |
int | pos | ||
) |
This method will use four bytes from the given byte array starting at position to create an int.
ba | the byte array |
pos | the position to start reading |
References com.latencybusters.pdm.PDMDeserializer.readInt().
long com.latencybusters.pdm.PDMDeserializer.readLong | ( | byte[] | ba, |
int | pos, | ||
boolean | byteSwap | ||
) |
This method will use eight bytes from the given byte array starting at position to create a long.
ba | the byte array |
pos | the position to start reading |
byteSwap | whether or not the bytes need to be swapped |
Referenced by com.latencybusters.pdm.PDMField.getInt64ArrayValue(), com.latencybusters.pdm.PDMField.getInt64Value(), com.latencybusters.pdm.PDMDeserializer.readDecimal(), com.latencybusters.pdm.PDMDeserializer.readDouble(), com.latencybusters.pdm.PDMDeserializer.readLong(), and com.latencybusters.pdm.PDMDeserializer.readULong().
long com.latencybusters.pdm.PDMDeserializer.readLong | ( | byte[] | ba, |
int | pos | ||
) |
This method will use eight bytes from the given byte array starting at position to create a long.
ba | the byte array |
pos | the position to start reading |
References com.latencybusters.pdm.PDMDeserializer.readLong().
short com.latencybusters.pdm.PDMDeserializer.readShort | ( | byte[] | ba, |
int | pos, | ||
boolean | byteSwap | ||
) |
This method will use two bytes from the given byte array starting at position to create a short.
ba | the byte array |
pos | the position to start reading |
byteSwap | whether or not the bytes need to be swapped |
Referenced by com.latencybusters.pdm.PDMField.getInt16ArrayValue(), com.latencybusters.pdm.PDMField.getInt16Value(), com.latencybusters.pdm.PDMFieldInfo.parse(), com.latencybusters.pdm.PDMDeserializer.readShort(), and com.latencybusters.pdm.PDMDeserializer.readUShort().
short com.latencybusters.pdm.PDMDeserializer.readShort | ( | byte[] | ba, |
int | pos | ||
) |
This method will use two bytes from the given byte array starting at position to create a short.
ba | the byte array |
pos | the position to start reading |
References com.latencybusters.pdm.PDMDeserializer.readShort().
String com.latencybusters.pdm.PDMDeserializer.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
ba | the byte array |
pos | the position to start reading |
len | the length of the string in bytes |
Referenced by com.latencybusters.pdm.PDMField.getStringArrayValue(), com.latencybusters.pdm.PDMField.getStringValue(), and com.latencybusters.pdm.PDMFieldInfo.parse().
PDMTimestamp com.latencybusters.pdm.PDMDeserializer.readTimestamp | ( | byte[] | ba, |
int | pos, | ||
boolean | byteSwap | ||
) |
This method will use eight bytes from the given byte array starting at position to create a PDMTimestamp.
ba | the byte array |
pos | the position to start reading |
byteSwap | whether or not the bytes need to be swapped |
References com.latencybusters.pdm.PDMDeserializer.readInt().
Referenced by com.latencybusters.pdm.PDMField.getTimestampArrayValue(), com.latencybusters.pdm.PDMField.getTimestampValue(), and com.latencybusters.pdm.PDMDeserializer.readTimestamp().
PDMTimestamp com.latencybusters.pdm.PDMDeserializer.readTimestamp | ( | byte[] | ba, |
int | pos | ||
) |
This method will use eight bytes from the given byte array starting at position to create a PDMTimestamp.
ba | the byte array |
pos | the position to start reading |
References com.latencybusters.pdm.PDMDeserializer.readTimestamp().
short com.latencybusters.pdm.PDMDeserializer.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).
ba | the byte array |
pos | the position to start reading |
References com.latencybusters.pdm.PDMDeserializer.readByte().
Referenced by com.latencybusters.pdm.PDMField.getUInt8ArrayValue(), and com.latencybusters.pdm.PDMField.getUInt8Value().
long com.latencybusters.pdm.PDMDeserializer.readUInt | ( | byte[] | ba, |
int | pos, | ||
boolean | byteSwap | ||
) |
This method will use four bytes from the given byte array starting at position to create an unsigned int (stored as a long).
ba | the byte array |
pos | the position to start reading |
byteSwap | whether or not the bytes need to be swapped |
References com.latencybusters.pdm.PDMDeserializer.readInt().
Referenced by com.latencybusters.pdm.PDMField.getUInt32ArrayValue(), and com.latencybusters.pdm.PDMField.getUInt32Value().
long com.latencybusters.pdm.PDMDeserializer.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).
ba | the byte array |
pos | the position to start reading |
References com.latencybusters.pdm.PDMDeserializer.readInt().
BigInteger com.latencybusters.pdm.PDMDeserializer.readULong | ( | byte[] | ba, |
int | pos, | ||
boolean | byteSwap | ||
) |
This method will use eight bytes from the given byte array starting at position to create an unsigned long (stored in a BigInteger).
ba | the byte array |
pos | the position to start reading |
byteSwap | whether or not the bytes need to be swapped |
References com.latencybusters.pdm.PDMDeserializer.readLong().
Referenced by com.latencybusters.pdm.PDMField.getUInt64ArrayValue(), com.latencybusters.pdm.PDMField.getUInt64Value(), and com.latencybusters.pdm.PDMDeserializer.readULong().
BigInteger com.latencybusters.pdm.PDMDeserializer.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).
ba | the byte array |
pos | the position to start reading |
References com.latencybusters.pdm.PDMDeserializer.readULong().
String com.latencybusters.pdm.PDMDeserializer.readUnicode | ( | byte[] | ba, |
int | pos, | ||
int | len, | ||
String | charSet | ||
) | throws UnsupportedEncodingException |
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
ba | the byte array |
pos | the position to start reading |
len | the length of the string in bytes |
charSet | the character set |
UnsupportedEncodingException |
Referenced by com.latencybusters.pdm.PDMField.getStringArrayValue(), com.latencybusters.pdm.PDMField.getStringValue(), and com.latencybusters.pdm.PDMDeserializer.readUnicode().
String com.latencybusters.pdm.PDMDeserializer.readUnicode | ( | byte[] | ba, |
int | pos, | ||
int | len | ||
) | throws UnsupportedEncodingException |
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
ba | the byte array |
pos | the position to start reading |
len | the length of the string in bytes |
UnsupportedEncodingException |
References com.latencybusters.pdm.PDMDeserializer.readUnicode().
int com.latencybusters.pdm.PDMDeserializer.readUShort | ( | byte[] | ba, |
int | pos, | ||
boolean | byteSwap | ||
) |
This method will use two bytes from the given byte array starting at position to create an unsigned short (stored as an int).
ba | the byte array |
pos | the position to start reading |
byteSwap | whether or not the bytes need to be swapped |
References com.latencybusters.pdm.PDMDeserializer.readShort().
Referenced by com.latencybusters.pdm.PDMField.getUInt16ArrayValue(), com.latencybusters.pdm.PDMField.getUInt16Value(), and com.latencybusters.pdm.PDMDeserializer.readUShort().
int com.latencybusters.pdm.PDMDeserializer.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).
ba | the byte array |
pos | the position to start reading |
References com.latencybusters.pdm.PDMDeserializer.readUShort().
void com.latencybusters.pdm.PDMDeserializer.setByteSwap | ( | byte[] | ba, |
int | pos, | ||
int | 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
ba | the byte array |
pos | the position to start reading |
magic |
References com.latencybusters.pdm.PDMDeserializer.readInt().