Interface AddressParser
- All Known Implementing Classes:
DefaultAddressParser, LenientAddressParser
public interface AddressParser
Abstract address parser.
-
Method Summary
Modifier and TypeMethodDescriptionparseAddress(CharSequence text) Parses the specified raw string into an address.parseAddressList(CharSequence text) Parse the address list string, such as the value of a From, To, Cc, Bcc, Sender, or Reply-To header.parseGroup(CharSequence text) Parses the specified raw string into a group address.parseMailbox(CharSequence text) Parses the specified raw string into a mailbox address.
-
Method Details
-
parseAddress
Parses the specified raw string into an address.- Parameters:
text- string to parse.- Returns:
- an
Addressobject for the specified string. - Throws:
ParseException- if the raw string does not represent a single address.
-
parseAddressList
Parse the address list string, such as the value of a From, To, Cc, Bcc, Sender, or Reply-To header. The string MUST be unfolded already.- Parameters:
text- string to parse.- Throws:
ParseException
-
parseMailbox
Parses the specified raw string into a mailbox address.- Parameters:
text- string to parse.- Returns:
- a
Mailboxobject for the specified string. - Throws:
ParseException- if the raw string does not represent a single mailbox address.
-
parseGroup
Parses the specified raw string into a group address.- Parameters:
text- string to parse.- Returns:
- a
Groupobject for the specified string. - Throws:
ParseException- if the raw string does not represent a single group address.
-