public class DefaultAddressParser extends Object implements AddressParser
Address
and its subclasses.Modifier and Type | Field and Description |
---|---|
static DefaultAddressParser |
DEFAULT |
Modifier | Constructor and Description |
---|---|
protected |
DefaultAddressParser() |
Modifier and Type | Method and Description |
---|---|
Address |
parseAddress(CharSequence text)
Parses the specified raw string into an address.
|
Address |
parseAddress(CharSequence text,
DecodeMonitor monitor)
Parses the specified raw string into an address.
|
AddressList |
parseAddressList(CharSequence text)
Parse the address list string, such as the value of a From, To, Cc, Bcc,
Sender, or Reply-To header.
|
AddressList |
parseAddressList(CharSequence text,
DecodeMonitor monitor)
Parse the address list string, such as the value of a From, To, Cc, Bcc,
Sender, or Reply-To header.
|
Group |
parseGroup(CharSequence text)
Parses the specified raw string into a group address.
|
Group |
parseGroup(CharSequence text,
DecodeMonitor monitor)
Parses the specified raw string into a group address.
|
Mailbox |
parseMailbox(CharSequence text)
Parses the specified raw string into a mailbox address.
|
Mailbox |
parseMailbox(CharSequence text,
DecodeMonitor monitor)
Parses the specified raw string into a mailbox address.
|
public static final DefaultAddressParser DEFAULT
public Address parseAddress(CharSequence text, DecodeMonitor monitor) throws ParseException
text
- string to parse.monitor
- the DecodeMonitor to be used while parsing/decodingAddress
object for the specified string.ParseException
- if the raw string does not represent a single address.public Address parseAddress(CharSequence text) throws ParseException
AddressParser
parseAddress
in interface AddressParser
text
- string to parse.Address
object for the specified string.ParseException
- if the raw string does not represent a single address.public AddressList parseAddressList(CharSequence text, DecodeMonitor monitor) throws ParseException
monitor
- the DecodeMonitor to be used while parsing/decodingParseException
public AddressList parseAddressList(CharSequence text) throws ParseException
AddressParser
parseAddressList
in interface AddressParser
text
- string to parse.ParseException
public Mailbox parseMailbox(CharSequence text, DecodeMonitor monitor) throws ParseException
text
- string to parse.monitor
- the DecodeMonitor to be used while parsing/decoding.Mailbox
object for the specified string.ParseException
- if the raw string does not represent a single mailbox
address.public Mailbox parseMailbox(CharSequence text) throws ParseException
AddressParser
parseMailbox
in interface AddressParser
text
- string to parse.Mailbox
object for the specified string.ParseException
- if the raw string does not represent a single mailbox
address.public Group parseGroup(CharSequence text, DecodeMonitor monitor) throws ParseException
text
- string to parse.Group
object for the specified string.ParseException
- if the raw string does not represent a single group address.public Group parseGroup(CharSequence text) throws ParseException
AddressParser
parseGroup
in interface AddressParser
text
- string to parse.Group
object for the specified string.ParseException
- if the raw string does not represent a single group address.Copyright © 2004–2023 The Apache Software Foundation. All rights reserved.