public final class MimeUtility
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
BASE64_ENCODING_MARKER
The marker to indicate text is encoded with BASE64 algorithm.
|
private static java.lang.String |
ENCODED_TOKEN_FINISHER
If the text contains any encoded tokens, those tokens will terminate with "=?".
|
private static java.lang.String |
ENCODED_TOKEN_MARKER
If the text contains any encoded tokens, those tokens will be marked with "=?".
|
private static java.lang.String |
LINEAR_WHITESPACE
The linear whitespace chars sequence.
|
private static java.util.Map<java.lang.String,java.lang.String> |
MIME2JAVA
Mappings between MIME and Java charset.
|
private static java.lang.String |
QUOTEDPRINTABLE_ENCODING_MARKER
The marker to indicate text is encoded with QuotedPrintable algorithm.
|
private static java.lang.String |
US_ASCII_CHARSET
The
US-ASCII charset identifier constant. |
Modifier | Constructor and Description |
---|---|
private |
MimeUtility()
Hidden constructor, this class must not be instantiated.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
decodeText(java.lang.String text)
Decode a string of text obtained from a mail header into
its proper form.
|
private static java.lang.String |
decodeWord(java.lang.String word)
Parse a string using the RFC 2047 rules for an "encoded-word"
type.
|
private static java.lang.String |
javaCharset(java.lang.String charset)
Translate a MIME standard character set name into the Java
equivalent.
|
private static final java.lang.String US_ASCII_CHARSET
US-ASCII
charset identifier constant.private static final java.lang.String BASE64_ENCODING_MARKER
private static final java.lang.String QUOTEDPRINTABLE_ENCODING_MARKER
private static final java.lang.String ENCODED_TOKEN_MARKER
private static final java.lang.String ENCODED_TOKEN_FINISHER
private static final java.lang.String LINEAR_WHITESPACE
private static final java.util.Map<java.lang.String,java.lang.String> MIME2JAVA
private MimeUtility()
public static java.lang.String decodeText(java.lang.String text) throws java.io.UnsupportedEncodingException
text
- The text to decode.java.io.UnsupportedEncodingException
- if the detected encoding in the input text is not supported.private static java.lang.String decodeWord(java.lang.String word) throws ParseException, java.io.UnsupportedEncodingException
word
- The possibly encoded word value.ParseException
java.io.UnsupportedEncodingException
private static java.lang.String javaCharset(java.lang.String charset)
charset
- The MIME standard name.