java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.io.IOException
javax.security.sasl.SaslException
public class SaslException
     此类表示在使用 SASL 时所发生的错误。
| 构造方法摘要 | |
|---|---|
SaslException() 构造一个新的 SaslException 实例。  |  
    |
SaslException(String detail) 构造带详细消息的新 SaslException 实例。  |  
    |
SaslException(String detail, Throwable ex) 构造带详细消息和根异常的新 SaslException 实例。  |  
    |
| 方法摘要 | |
|---|---|
  Throwable |  
     getCause() 返回此 throwable 的 cause;如果 cause 不存在或未知,则返回 null。 |  
    
  Throwable |  
     initCause(Throwable cause) 将此 throwable 的 cause 初始化为指定值。  |  
    
  String |  
     toString() 返回此异常的字符串表示形式。  |  
    
| 从类 java.lang.Throwable 继承的方法 | 
|---|
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, printStackTrace, printStackTrace, printStackTrace, setStackTrace |  
    
| 从类 java.lang.Object 继承的方法 | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |  
    
| 构造方法详细信息 | 
|---|
public SaslException()
public SaslException(String detail)
detail - 包含异常细节的字符串,可以为 null。
     Throwable.getMessage()
     public SaslException(String detail, Throwable ex)
detail - 包含异常细节的字符串,可能为 null。
     ex - 导致此异常的根异常,可能为 null。
     Throwable.getMessage(), 
      getCause()
     | 方法详细信息 | 
|---|
public Throwable getCause()
Throwable 复制的描述
   null。(该 Cause 是导致抛出此 throwable 的throwable。) 
    此实现返回由一个需要 Throwable 的构造方法提供的 cause,或者在创建之后通过 Throwable.initCause(Throwable) 方法进行设置的 cause。虽然通常不需要重写此方法,但子类可以重写它,以返回一个通过某些其他方式设置的 cause。这适用于在异常链(异常嵌套)机制被加入到 Throwable 之前存在“遗留 Throwable 链机制”的情况。注意,不必 重写任何 PrintStackTrace 方法,所有方法都调用 getCause 方法来确定 throwable 的 cause。 
null。
     public Throwable initCause(Throwable cause)
Throwable 复制的描述
   此方法至多可以调用一次。此方法通常从构造方法中调用,或者在创建 throwable 后立即调用。如果此 throwable 通过 Throwable.Throwable(Throwable) 或 Throwable.Throwable(String,Throwable) 创建,此方法甚至一次也不能调用。 
cause - 原因(保存此 cause,以便以后通过 
      Throwable.getCause() 方法获取它)。(允许 
      null 值,指出 cause 是不存在的或是未知的。) 
     Throwable 实例的引用。
     public String toString()
Throwable.getMessage()