Top Description Fields Constructors Methods
jakarta.mail.internet

public Class AddressException

extends ParseException
Class Inheritance

The exception thrown when a wrongly formatted address is encountered.
Authors
Bill Shannon, Max Spivak

Field Summary

Modifier and TypeField and Description
protected int
pos

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

protected String
ref

The string being parsed.

private static final long

Constructor Summary

AccessConstructor and Description
public
AddressException()

Constructs an AddressException with no detail message.

public
AddressException(String
the detail message
s
)

Constructs an AddressException with the specified detail message.

public
AddressException(String
the detail message
s
,
String
the string being parsed
ref
)

Constructs an AddressException with the specified detail message and reference info.

public
AddressException(String
the detail message
s
,
String
the string being parsed
ref
,
int
the position of the error
pos
)

Constructs an AddressException with the specified detail message and reference info.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the position within the string of the error
getPos
()

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

public String

Returns:

the string that was being parsed
getRef
()

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

public String
toString()

Overrides jakarta.mail.MessagingException.toString.

Override toString method to provide information on nested exceptions.

Field Detail

posback to summary
protected int pos

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

refback to summary
protected String ref

The string being parsed.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides jakarta.mail.internet.ParseException.serialVersionUID.

Constructor Detail

AddressExceptionback to summary
public AddressException()

Constructs an AddressException with no detail message.

AddressExceptionback to summary
public AddressException(String s)

Constructs an AddressException with the specified detail message.

Parameters
s:String

the detail message

AddressExceptionback to summary
public AddressException(String s, String ref)

Constructs an AddressException with the specified detail message and reference info.

Parameters
s:String

the detail message

ref:String

the string being parsed

AddressExceptionback to summary
public AddressException(String s, String ref, int pos)

Constructs an AddressException with the specified detail message and reference info.

Parameters
s:String

the detail message

ref:String

the string being parsed

pos:int

the position of the error

Method Detail

getPosback to summary
public int getPos()

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

Returns:int

the position within the string of the error

getRefback to summary
public String getRef()

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

Returns:String

the string that was being parsed

toStringback to summary
public String toString()

Overrides jakarta.mail.MessagingException.toString.

Doc from jakarta.mail.MessagingException.toString.

Override toString method to provide information on nested exceptions.

Returns:String

Doc from java.lang.Throwable.toString.

a string representation of this throwable.

Annotations
@Override