javax.mail.internet

Class AddressException


public class AddressException
extends ParseException

An exception thrown when an incorrectly formatted address is encountered.
Version:
1.4
Author:
Chris Burdess

Field Summary

protected int
pos
The index in ref where the error occurred, or -1 if not known.
protected String
ref
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

int
getPos()
Returns the position within ref where the error was detected, or -1 if ref is null.
String
getRef()
Returns the address(es) being parsed when the error was detected.
String
toString()

Methods inherited from class javax.mail.MessagingException

getMessage, getNextException, printStackTrace, printStackTrace, setNextException

Field Details

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 Details

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 Details

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()

© Copyright 2003, 2004 The Free Software Foundation, All rights reserved