Interface AddressParser

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Address parseAddress​(java.lang.CharSequence text)
      Parses the specified raw string into an address.
      AddressList parseAddressList​(java.lang.CharSequence text)
      Parse the address list string, such as the value of a From, To, Cc, Bcc, Sender, or Reply-To header.
      Group parseGroup​(java.lang.CharSequence text)
      Parses the specified raw string into a group address.
      Mailbox parseMailbox​(java.lang.CharSequence text)
      Parses the specified raw string into a mailbox address.
    • Method Detail

      • parseAddress

        Address parseAddress​(java.lang.CharSequence text)
                      throws ParseException
        Parses the specified raw string into an address.
        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

        AddressList parseAddressList​(java.lang.CharSequence text)
                              throws ParseException
        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

        Mailbox parseMailbox​(java.lang.CharSequence text)
                      throws ParseException
        Parses the specified raw string into a mailbox address.
        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

        Group parseGroup​(java.lang.CharSequence text)
                  throws ParseException
        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.