Package 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:
java.io.Serializable
public class AddressException extends ParseException
An exception thrown when an incorrectly formatted address is encountered.- Version:
- 1.4
- Author:
- Chris Burdess
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AddressException()
Constructor with no detail message.AddressException(java.lang.String s)
Constructor with the specified detail message.AddressException(java.lang.String s, java.lang.String ref)
Constructor with the specified detail message and address being parsed.AddressException(java.lang.String s, java.lang.String ref, int pos)
Constructor with the specified detail message and address being parsed.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getPos()
Returns the position withinref
where the error was detected, or -1 ifref
is null.java.lang.String
getRef()
Returns the address(es) being parsed when the error was detected.java.lang.String
toString()
-
Methods inherited from class javax.mail.MessagingException
getMessage, getNextException, printStackTrace, printStackTrace, setNextException
-
-
-
-
Constructor Detail
-
AddressException
public AddressException()
Constructor with no detail message.
-
AddressException
public AddressException(java.lang.String s)
Constructor with the specified detail message.- Parameters:
s
- the detail message
-
AddressException
public AddressException(java.lang.String s, java.lang.String ref)
Constructor with the specified detail message and address being parsed.- Parameters:
s
- the detail messageref
- the address being parsed
-
AddressException
public AddressException(java.lang.String s, java.lang.String ref, int pos)
Constructor with the specified detail message and address being parsed.- Parameters:
s
- the detail messageref
- the address being parsedpos
- the index inref
where the error occurred
-
-
Method Detail
-
getRef
public java.lang.String getRef()
Returns the address(es) being parsed when the error was detected.
-
getPos
public int getPos()
Returns the position withinref
where the error was detected, or -1 ifref
is null.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Throwable
-
-