Class DefaultAddressParser
java.lang.Object
org.apache.james.mime4j.field.address.DefaultAddressParser
- All Implemented Interfaces:
AddressParser
Default (strict) builder for
Address
and its subclasses.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionparseAddress
(CharSequence text) Parses the specified raw string into an address.parseAddress
(CharSequence text, DecodeMonitor monitor) 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.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.parseGroup
(CharSequence text) Parses the specified raw string into a group address.parseGroup
(CharSequence text, DecodeMonitor monitor) Parses the specified raw string into a group address.parseMailbox
(CharSequence text) Parses the specified raw string into a mailbox address.parseMailbox
(CharSequence text, DecodeMonitor monitor) Parses the specified raw string into a mailbox address.
-
Field Details
-
DEFAULT
-
-
Constructor Details
-
DefaultAddressParser
protected DefaultAddressParser()
-
-
Method Details
-
parseAddress
Parses the specified raw string into an address.- Parameters:
text
- string to parse.monitor
- the DecodeMonitor to be used while parsing/decoding- Returns:
- an
Address
object for the specified string. - Throws:
ParseException
- if the raw string does not represent a single address.
-
parseAddress
Description copied from interface:AddressParser
Parses the specified raw string into an address.- Specified by:
parseAddress
in interfaceAddressParser
- Parameters:
text
- string to parse.- Returns:
- an
Address
object 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:
monitor
- the DecodeMonitor to be used while parsing/decoding- Throws:
ParseException
-
parseAddressList
Description copied from interface:AddressParser
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.- Specified by:
parseAddressList
in interfaceAddressParser
- Parameters:
text
- string to parse.- Throws:
ParseException
-
parseMailbox
Parses the specified raw string into a mailbox address.- Parameters:
text
- string to parse.monitor
- the DecodeMonitor to be used while parsing/decoding.- Returns:
- a
Mailbox
object for the specified string. - Throws:
ParseException
- if the raw string does not represent a single mailbox address.
-
parseMailbox
Description copied from interface:AddressParser
Parses the specified raw string into a mailbox address.- Specified by:
parseMailbox
in interfaceAddressParser
- Parameters:
text
- string to parse.- Returns:
- a
Mailbox
object 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
Group
object for the specified string. - Throws:
ParseException
- if the raw string does not represent a single group address.
-
parseGroup
Description copied from interface:AddressParser
Parses the specified raw string into a group address.- Specified by:
parseGroup
in interfaceAddressParser
- Parameters:
text
- string to parse.- Returns:
- a
Group
object for the specified string. - Throws:
ParseException
- if the raw string does not represent a single group address.
-