javax.microedition.ipdr
Class ProtocolMalformedMsgException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjavax.microedition.ipdr.ProtocolMalformedMsgException
All Implemented Interfaces:
java.io.Serializable

public final class ProtocolMalformedMsgException
extends java.lang.Exception

Represents the exception which provides the information about a mal-formed message.

This exception is being used for reporting cases where the received message is in a garbled form.

Version:
1.0
Author:
Shai Gotlib

Field Summary
 int offset
          The offset within the message bytes where the problem was detected.
 byte[] rawMsg
          The message raw bytes (including header).
 int rawMsgLength
          The message raw bytes length.
 
Fields inherited from class java.lang.Exception
 
Constructor Summary
ProtocolMalformedMsgException(java.lang.String msg, byte[] rawMsg, int length, int offset)
          Creates an exception (should never happen if the transmitter is performing properly).
 
Method Summary
 java.lang.String getMessage()
          Gets the detail messages about this exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

rawMsg

public byte[] rawMsg
The message raw bytes (including header).


rawMsgLength

public int rawMsgLength
The message raw bytes length.


offset

public int offset
The offset within the message bytes where the problem was detected.

Constructor Detail

ProtocolMalformedMsgException

public ProtocolMalformedMsgException(java.lang.String msg,
                                     byte[] rawMsg,
                                     int length,
                                     int offset)
Creates an exception (should never happen if the transmitter is performing properly).

Parameters:
msg - message that describes what went wrong.
rawMsg - The IPDR protocol message from the collector.
length - The length of the IPDR protocol message.
offset - Offset regrding where the problem was discovered inside the IPDR protocol message.
Method Detail

getMessage

public java.lang.String getMessage()
Gets the detail messages about this exception.

Returns:
The detail message.