Class MailUtil
- java.lang.Object
-
- org.apache.tika.parser.mailcommons.MailUtil
-
public class MailUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description MailUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addPersonAndEmail(String string, Property personProperty, Property emailProperty, Metadata metadata)
This tries to split a "from" or "to" value into a person field and an email field.static boolean
containsEmail(String chunk)
If the chunk looks like it contains an emailstatic void
setPersonAndEmail(String string, Property personProperty, Property emailProperty, Metadata metadata)
This tries to split a "from" or "to" value into a person field and an email field.
-
-
-
Method Detail
-
setPersonAndEmail
public static void setPersonAndEmail(String string, Property personProperty, Property emailProperty, Metadata metadata)
This tries to split a "from" or "to" value into a person field and an email field. This does not handle RFC encoded strings (e.g. "=?iso-8859-1?Q?H=E9roux_Louise?"), you must decode them first.- Parameters:
string
-personProperty
-emailProperty
-metadata
-
-
addPersonAndEmail
public static void addPersonAndEmail(String string, Property personProperty, Property emailProperty, Metadata metadata)
This tries to split a "from" or "to" value into a person field and an email field. This does not handle RFC encoded strings (e.g. "=?iso-8859-1?Q?H=E9roux_Louise?"), you must decode them first.- Parameters:
string
-personProperty
-emailProperty
-metadata
-
-
containsEmail
public static boolean containsEmail(String chunk)
If the chunk looks like it contains an email- Parameters:
chunk
- to analyse- Returns:
true
if chunk looks like it contains an email
-
-