|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.mail.internet Class AddressException
java.lang.Object java.lang.Throwable java.lang.Exception javax.mail.MessagingException javax.mail.internet.ParseException 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 |
pos
The index in the string where the error occurred, or -1 if not known. |
protected String |
ref
The string being parsed. |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class javax.mail.MessagingException |
---|
getCause, getNextException, setNextException |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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 classMessagingException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!