AddressException (Java EE 5)

Java EE API


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
All Implemented Interfaces:
Serializable

public class AddressException
extends ParseException

Extends: Throwable > Exception > MessagingException > ParseException

遇到格式错误的地址时抛出的异常。
英文文档:

The exception thrown when a wrongly formatted address is encountered.

Author:
Bill Shannon, Max Spivak
See Also:
Serialized Form

Field Summary
protected  int
protected  String
 
Constructor Summary
 
Method Summary
 int
 String
 String
 
Methods inherited from class javax.mail.MessagingException
 
Methods inherited from class java.lang.Throwable
 
Methods inherited from class java.lang.Object
 

Field Detail

英文文档:

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.

Constructor Detail

public AddressException()
构造不带详细消息的 AddressException。
英文文档:

AddressException

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


public AddressException(String s)
构造带指定详细消息的 AddressException。
s 详细信息
英文文档:

AddressException

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

Parameters:
s - the detail message


public AddressException(String s, String ref)
构造带指定详细消息和参考信息的 AddressException。
s 详细信息
英文文档:

AddressException

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

Parameters:
s - the detail message


public AddressException(String s, String ref, int pos)
构造带指定详细消息和参考信息的 AddressException。
s 详细信息
英文文档:

AddressException

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

Parameters:
s - the detail message

Method Detail

public String getRef()
获取当检测到错误时正被解析的字符串(如果不相关,则为 null)。
英文文档:

getRef

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


public int getPos()
获取检测到错误的引用字符串的位置(如果不相关,则为 -1)。
英文文档:

getPos

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


public String toString()
英文文档:

toString

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

Overrides:
toString in class MessagingException


Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

一看就知道只有菜鸟才干这么无知的事啦。

PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!