javax.mail.internet

Class AddressException

public class AddressException extends ParseException

An exception thrown when an incorrectly formatted address is encountered.

Version: 1.3

Author: Chris Burdess

Field Summary
protected intpos
The index in ref where the error occurred, or -1 if not known.
protected Stringref
The address(es) being parsed.
Constructor Summary
AddressException()
Constructor with no detail message.
AddressException(String s)
Constructor with the specified detail message.
AddressException(String s, String ref)
Constructor with the specified detail message and address being parsed.
AddressException(String s, String ref, int pos)
Constructor with the specified detail message and address being parsed.
Method Summary
intgetPos()
Returns the position within ref where the error was detected, or -1 if ref is null.
StringgetRef()
Returns the address(es) being parsed when the error was detected.
StringtoString()

Field Detail

pos

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

ref

protected String ref
The address(es) being parsed.

Constructor Detail

AddressException

public AddressException()
Constructor with no detail message.

AddressException

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

Parameters: s the detail message

AddressException

public AddressException(String s, String ref)
Constructor with the specified detail message and address being parsed.

Parameters: s the detail message ref the address being parsed

AddressException

public AddressException(String s, String ref, int pos)
Constructor with the specified detail message and address being parsed.

Parameters: s the detail message ref the address being parsed pos the index in ref where the error occurred

Method Detail

getPos

public int getPos()
Returns the position within ref where the error was detected, or -1 if ref is null.

getRef

public String getRef()
Returns the address(es) being parsed when the error was detected.

toString

public String toString()
©