dk.itu.haas.GPS.Garmin
Class PacketNotRecognizedException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--dk.itu.haas.GPS.Garmin.PacketNotRecognizedException
All Implemented Interfaces:
java.io.Serializable

public class PacketNotRecognizedException
extends java.lang.RuntimeException

This exception is thrown whenever a method expects one type of packet, but receives another. An example is if a PositionDataPacket is initialized with the byte-array containing time-data. This exception is a runtime exception because it's assumed that there will in most cases be type-checking of packets.

See Also:
Serialized Form

Constructor Summary
PacketNotRecognizedException(int expected, int actual)
          expected is the type of packet that the method was expecting. actual is the type of the packet that it received.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PacketNotRecognizedException

public PacketNotRecognizedException(int expected,
                                    int actual)
expected is the type of packet that the method was expecting. actual is the type of the packet that it received.