advancedrelay.laygo
Class ProtocolEventException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--advancedrelay.laygo.ProtocolEventException
All Implemented Interfaces:
ProtocolEventObject, java.io.Serializable

public class ProtocolEventException
extends java.lang.Exception
implements ProtocolEventObject

Encapsulates the unsuccessful result a read() or readSpecial() when an unexpected event is waiting. The byte array may not be full, so the index of the first unused byte is stored as the size. The data may be null and/or the size 0.

See Also:
Serialized Form

Constructor Summary
ProtocolEventException()
           
ProtocolEventException(int type)
           
ProtocolEventException(int type, byte[] data, int size)
           
ProtocolEventException(ProtocolEvent event)
           
ProtocolEventException(java.lang.String msg)
           
 
Method Summary
 byte[] getData()
           
 int getDataSize()
           
 ProtocolEvent getEvent()
           
 int getType()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProtocolEventException

public ProtocolEventException()

ProtocolEventException

public ProtocolEventException(int type)

ProtocolEventException

public ProtocolEventException(int type,
                              byte[] data,
                              int size)

ProtocolEventException

public ProtocolEventException(ProtocolEvent event)

ProtocolEventException

public ProtocolEventException(java.lang.String msg)
Method Detail

getData

public byte[] getData()
Specified by:
getData in interface ProtocolEventObject

getDataSize

public int getDataSize()
Specified by:
getDataSize in interface ProtocolEventObject

getEvent

public ProtocolEvent getEvent()

getType

public int getType()
Specified by:
getType in interface ProtocolEventObject

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Throwable