com.opensymphony.util
Class MailUtils

java.lang.Object
  extended bycom.opensymphony.util.MailUtils

public class MailUtils
extends Object

Utility methods once in TextUtils that require the mail.jar library.

Version:
$Revision: 1.1.1.1 $
Author:
$Author: hani $

Constructor Summary
MailUtils()
           
 
Method Summary
static byte[] decodeBytes(String str)
          Decode binary data from String using base64.
static String encodeBytes(byte[] data)
          Encode binary data into String using base64.
static boolean verifyEmail(String email)
          Verify that the given string is a valid email address.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MailUtils

public MailUtils()
Method Detail

decodeBytes

public static final byte[] decodeBytes(String str)
                                throws IOException
Decode binary data from String using base64.

Throws:
IOException
See Also:
encodeBytes(byte[])

encodeBytes

public static final String encodeBytes(byte[] data)
                                throws IOException
Encode binary data into String using base64.

Throws:
IOException
See Also:
decodeBytes(java.lang.String)

verifyEmail

public static final boolean verifyEmail(String email)
Verify that the given string is a valid email address. "Validity" in this context only means that the address conforms to the correct syntax (not if the address actually exists).

Parameters:
email - The email address to verify.
Returns:
a boolean indicating whether the email address is correctly formatted.

OSCore Project Page