public final class ImMailUtils extends Object
修飾子とタイプ | メソッドと説明 |
---|---|
static String |
createEmailAddress(String account,
String domain)
指定されたアカウント名とドメイン名からメールアドレスを生成します。
|
static boolean |
equalsTreatEmpty(String str1,
String str2)
指定された文字列が一致するかを返却します。
|
protected static int |
indexAtmark(String address)
指定されたメールアドレスに含まれる@のインデックスを返却します。
|
static String |
splitEmailAddressAccount(String address)
指定されたメールアドレスを@で分割しアカウント名を取得します。
|
static String |
splitEmailAddressDomain(String address)
指定されたメールアドレスを@で分割しドメイン名を取得します。
|
static String |
substring(String value,
int length)
文字列の指定された文字列長の部分文字列を返します。
|
static String |
substringByByteSize(String value,
int size,
String charset)
文字列の指定された文字コードのバイトサイズでの部分文字列を返します。
|
public static String createEmailAddress(String account, String domain) throws ImMailException
account
- アカウント名domain
- ドメイン名ImMailException
- アカウント名、ドメイン名のいずれかが、null、ブランク、空白の場合public static boolean equalsTreatEmpty(String str1, String str2)
文字列のnullと""(空文字)はempty値として扱いtrue(一致)を返却します。
str1
- 文字列str2
- 文字列public static String splitEmailAddressAccount(String address) throws ImMailException
address
- メールアドレスImMailException
- メールアドレスが不正な場合にスローされます。public static String splitEmailAddressDomain(String address) throws ImMailException
address
- メールアドレスImMailException
- メールアドレスが不正な場合にスローされます。public static String substring(String value, int length)
value
- 文字列length
- 文字列長public static String substringByByteSize(String value, int size, String charset) throws UnsupportedEncodingException
value
- 文字列size
- サイズ(バイト)charset
- 文字コードUnsupportedEncodingException
- サポートされていない文字コードが指定された場合protected static int indexAtmark(String address) throws ImMailException
address
- メールアドレスImMailException
- メールアドレスに@が含まれない、@が2つ以上含まれる、先頭または末尾が@の場合Copyright © 2013 NTT DATA INTRAMART CORPORATION