jwo.landserf.process.gps.garmin
Class InvalidPacketException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by jwo.landserf.process.gps.garmin.InvalidPacketException
All Implemented Interfaces:
Serializable

public class InvalidPacketException
extends RuntimeException

Represents a problem in the form of a packet transferred to or from the GPS.

Version:
2.3, 22nd August, 2006.
Author:
Jo Wood, based on the design by Henrik Sorensen (haas@itu.dk).
See Also:
Serialized Form

Constructor Summary
InvalidPacketException(GarminPacket packet)
          Creates an InvalidPacketException.
 
Method Summary
 GarminPacket getPacket()
          Reports the packet that caused the exception to be thrown.
 String toString()
          Provides formatted text showing the packet with the problem.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InvalidPacketException

public InvalidPacketException(GarminPacket packet)
Creates an InvalidPacketException.

Parameters:
packet - Packet containing the error.
Method Detail

getPacket

public GarminPacket getPacket()
Reports the packet that caused the exception to be thrown.

Returns:
Array representing the packet that generated the exception.

toString

public String toString()
Provides formatted text showing the packet with the problem.

Overrides:
toString in class Throwable
Returns:
Description of the problematic packet.


Copyright Jo Wood, 1996-2009, last modified, 17th April, 2009