Class AddressFormatter
java.lang.Object
org.apache.james.mime4j.field.address.AddressFormatter
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidencode(StringBuilder sb, Address address) Returns a string representation of this address that can be used for transport purposes.voidencode(StringBuilder sb, Group group) voidencode(StringBuilder sb, Mailbox mailbox) voidformat(StringBuilder sb, Address address, boolean includeRoute) Formats the address as a human readable string, not including the route.voidformat(StringBuilder sb, Group group, boolean includeRoute) voidformat(StringBuilder sb, Mailbox mailbox, boolean includeRoute)
-
Field Details
-
DEFAULT
-
-
Constructor Details
-
AddressFormatter
protected AddressFormatter()
-
-
Method Details
-
format
Formats the address as a human readable string, not including the route. The resulting string is intended for display purposes only and cannot be used for transport purposes.
For example, if the unparsed address was
<"Joe Cheng"@joecheng.com>
this method would return
<Joe Cheng@joecheng.com>
which is not valid for transport; the local part would need to be re-quoted.- Parameters:
includeRoute-trueif the route should be included if it exists,falseotherwise.
-
encode
Returns a string representation of this address that can be used for transport purposes. The route is never included in this representation because routes are obsolete and RFC 5322 states that obsolete syntactic forms MUST NOT be generated. -
format
-
format
-
encode
-
encode
-
format
-
format
-
encode
-
encode
-