*/
public void fromByteArray(byte[] data) throws InvalidMessageException {
try {
ByteArrayReader bar = new ByteArrayReader(data);
if (bar.available() > 0) {
type = bar.read();
constructMessage(bar);
} else {
throw new InvalidMessageException(
"Not enough message data to complete the message");