anon.crypto.tinytls
Class TLSException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.io.IOException
              extended by anon.crypto.tinytls.TLSException
All Implemented Interfaces:
java.io.Serializable

public class TLSException
extends java.io.IOException

Author:
stefan TLSException
See Also:
Serialized Form

Field Summary
static int DESC_CLOSE_NOTIFY
           
static int LEVEL_FATAL
           
static int LEVEL_WARNING
           
private  boolean m_Alert
           
private  byte m_AlertDescription
           
private  byte m_AlertLevel
           
static java.lang.String MSG_EOF
           
 
Constructor Summary
TLSException(java.lang.String s)
          Constructor
TLSException(java.lang.String s, int level, int description)
          Constructor
 
Method Summary
 boolean Alert()
          check if this Exception is an alert
 byte getAlertDescription()
          if the Exception is an alert an alertdescription is returned
 byte getAlertLevel()
          if the Exception is an alert an alertlevel is returned
 
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
 

Field Detail

LEVEL_WARNING

public static final int LEVEL_WARNING
See Also:
Constant Field Values

LEVEL_FATAL

public static final int LEVEL_FATAL
See Also:
Constant Field Values

MSG_EOF

public static final java.lang.String MSG_EOF
See Also:
Constant Field Values

DESC_CLOSE_NOTIFY

public static final int DESC_CLOSE_NOTIFY
See Also:
Constant Field Values

m_AlertLevel

private byte m_AlertLevel

m_AlertDescription

private byte m_AlertDescription

m_Alert

private boolean m_Alert
Constructor Detail

TLSException

public TLSException(java.lang.String s)
Constructor

Parameters:
s - message

TLSException

public TLSException(java.lang.String s,
                    int level,
                    int description)
Constructor

Parameters:
s - message
level - errorlevel (1:warning, 2:fatal)
description - description (see RFC2246 -> 7.2 Alert protocol)
Method Detail

Alert

public boolean Alert()
check if this Exception is an alert

Returns:

getAlertLevel

public byte getAlertLevel()
if the Exception is an alert an alertlevel is returned

Returns:
alertlevel

getAlertDescription

public byte getAlertDescription()
if the Exception is an alert an alertdescription is returned

Returns:
alertdescription