org.jscience.devices.gps.garmin
Class PacketNotRecognizedException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.jscience.devices.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.
 
Method Summary
 
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.

Parameters:
expected - DOCUMENT ME!
actual - DOCUMENT ME!