AddressException (Java EE 5 SDK)

Java

Java EE 5 SDK

深圳电信培训中心.徐海蛟老师.


javax.mail.internet Class AddressException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by javax.mail.MessagingException
              extended by javax.mail.internet.ParseException
                  extended by javax.mail.internet.AddressException
所有已实现的接口:
Serializable

public class AddressException
extends ParseException

The exception thrown when a wrongly formatted address is encountered.

作者:
Bill Shannon, Max Spivak
另请参见:
Serialized Form

字段摘要
protected  int pos
          The index in the string where the error occurred, or -1 if not known.
protected  String ref
          The string being parsed.
 
构造器摘要
AddressException()
          Constructs an AddressException with no detail message.
AddressException(String s)
          Constructs an AddressException with the specified detail message.
AddressException(String s, String ref)
          Constructs an AddressException with the specified detail message and reference info.
AddressException(String s, String ref, int pos)
          Constructs an AddressException with the specified detail message and reference info.
 
方法摘要
 int getPos()
          Get the position with the reference string where the error was detected (-1 if not relevant).
 String getRef()
          Get the string that was being parsed when the error was detected (null if not relevant).
 String toString()
          Override toString method to provide information on nested exceptions.
 
类方法继承 javax.mail.MessagingException
getCause, getNextException, setNextException
 
类方法继承 java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
类方法继承 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

字段详细信息

ref

protected String ref
The string being parsed.


pos

protected int pos
The index in the string where the error occurred, or -1 if not known.

构造器详细信息

AddressException

public AddressException()
Constructs an AddressException with no detail message.


AddressException

public AddressException(String s)
Constructs an AddressException with the specified detail message.

参数:
s - the detail message


AddressException

public AddressException(String s,
                        String ref)
Constructs an AddressException with the specified detail message and reference info.

参数:
s - the detail message


AddressException

public AddressException(String s,
                        String ref,
                        int pos)
Constructs an AddressException with the specified detail message and reference info.

参数:
s - the detail message

方法详细信息

getRef

public String getRef()
Get the string that was being parsed when the error was detected (null if not relevant).


getPos

public int getPos()
Get the position with the reference string where the error was detected (-1 if not relevant).


toString

public String toString()
Description copied from class: MessagingException
Override toString method to provide information on nested exceptions.

重写:
toString in class MessagingException

Java EE 5 SDK

深圳电信培训中心.徐海蛟老师.


提交错误或意见

版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。深圳电信培训中心.徐海蛟老师教学参考.