jwo.landserf.process.gps.garmin
Class PacketNotRecognisedException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended byjwo.landserf.process.gps.garmin.PacketNotRecognisedException
All Implemented Interfaces:
Serializable

public class PacketNotRecognisedException
extends RuntimeException

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

Version:
2.2, 15th June, 2004
Author:
Jo Wood, based on the design by Henrik Sorensen (haas@itu.dk).
See Also:
Serialized Form

Constructor Summary
PacketNotRecognisedException(int expected, int actual)
          Creates the exception.
 
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

PacketNotRecognisedException

public PacketNotRecognisedException(int expected,
                                    int actual)
Creates the exception.

Parameters:
expected - Type of packet that was expected.
actual - Type of the packet that was actually received.


Copyright Jo Wood, 1996-2005, last modified, 11th March, 2005