com.opensymphony.util
Class MailUtils

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

public class MailUtils
extends java.lang.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(java.lang.String str)
          Decode binary data from String using base64.
static java.lang.String encodeBytes(byte[] data)
          Encode binary data into String using base64.
static boolean verifyEmail(java.lang.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(java.lang.String str)
                                throws java.io.IOException
Decode binary data from String using base64.

Throws:
java.io.IOException
See Also:
encodeBytes(byte[])

encodeBytes

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

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

verifyEmail

public static final boolean verifyEmail(java.lang.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.

See www.opensymphony.com for more information.