|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.openexchange.mail.mime.RFC2231Tools
public final class RFC2231Tools
RFC2231Tools - A collection of RFC2231 related utility
methods
| Method Summary | |
|---|---|
static boolean |
isAscii(char c)
Checks whether the character is ASCII 7 bit |
static boolean |
isAscii(java.lang.String s)
Checks whether the specified string's characters are ASCII 7 bit |
static java.lang.String[] |
parseRFC2231Value(java.lang.String rfc2231Value)
Parses given RFC2231 value into its charset, language and rfc2231-encoded value. |
static java.lang.String |
rfc2231Decode(java.lang.String encoded)
Decodes specified string according to mail-safe encoding introduced in RFC2231 This method assumes that encoding information are contained in given string; e.g. |
static java.lang.String |
rfc2231Decode(java.lang.String encoded,
java.lang.String charset)
Decodes specified string according to mail-safe encoding introduced in RFC2231 |
static java.lang.String |
rfc2231Encode(java.lang.String toEncode,
java.lang.String charset,
java.lang.String language,
boolean prepend)
Encodes given string according to mechanism provided in RFC2231. |
static java.lang.String |
rfc2231Encode(java.lang.String toEncode,
java.lang.String charset,
java.lang.String language,
boolean prepend,
boolean force)
Encodes given string according to mechanism provided in RFC2231. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.lang.String[] parseRFC2231Value(java.lang.String rfc2231Value)
<charset-name> + "'" + <language-code> + "'" + <encoded-data>
rfc2231Value - The rfc2231 value
String containing charset, language, and rfc2231-encoded value or null if value does not
match pattern.public static java.lang.String rfc2231Decode(java.lang.String encoded)
This method assumes that encoding information are contained in given string; e.g.
utf-8'EN'%C2%A4%20txt
encoded - The encoded string
public static java.lang.String rfc2231Decode(java.lang.String encoded,
java.lang.String charset)
encoded - The encoded stringcharset - The charset name
public static java.lang.String rfc2231Encode(java.lang.String toEncode,
java.lang.String charset,
java.lang.String language,
boolean prepend)
toEncode - The string to encodecharset - The charset encodinglanguage - The language to appendprepend - true to prepend charset and language information; otherwise false
public static java.lang.String rfc2231Encode(java.lang.String toEncode,
java.lang.String charset,
java.lang.String language,
boolean prepend,
boolean force)
toEncode - The string to encodecharset - The charset encodinglanguage - The language to appendprepend - true to prepend charset and language information; otherwise falseforce - true to force encoding even if string to encode only consists of ASCII characters; otherwise
false
public static boolean isAscii(java.lang.String s)
s - The string to check
true if string's characters are ASCII 7 bit; otherwise falsepublic static boolean isAscii(char c)
c - The character to check
true if character is ASCII 7 bit; otherwise false
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||