public final class MimeUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
MimeUtil.HeadersLinesReceiver
Utility class to receive MIME header lines.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
decodeRFC2047(String value)
Decode a header content using RFC 2047, which specifies encoded word as follows:
encoded-word = "=?" charset "?" encoding "?" encoded-text "?=".
|
static String |
decodeRFC2047Word(String encodedWord)
Decode a word based on RFC 2047 specification.
|
static String |
encodeUTF8Value(String value)
Encode a header parameter value, taking bytes in UTF-8,
and depending on its content it may be directly returned,
it may use double-quote or it may use the RFC 2047 encoding.
|
static String |
encodeValue(String value,
Charset charset)
Encode a header parameter value, taking bytes in the given charset,
and depending on its content it may be directly returned,
it may use double-quote or it may use the RFC 2047 encoding.
|
static MimeMessage |
mimeFromString(String content,
Charset charset,
String contentType)
Create a MimeMessage with a Content-Type header and the body from the given string.
|
static net.lecousin.framework.concurrent.synch.AsyncWork<MimeMessage,IOException> |
parseMimeMessage(net.lecousin.framework.io.IO.Readable.Buffered input)
Parse the input and generate a MimeMessage.
|
public static String decodeRFC2047(String value) throws IOException
IOExceptionpublic static String decodeRFC2047Word(String encodedWord) throws UnsupportedEncodingException, IOException
public static String encodeValue(String value, Charset charset)
public static String encodeUTF8Value(String value)
public static MimeMessage mimeFromString(String content, Charset charset, String contentType)
public static net.lecousin.framework.concurrent.synch.AsyncWork<MimeMessage,IOException> parseMimeMessage(net.lecousin.framework.io.IO.Readable.Buffered input)
Copyright © 2018. All rights reserved.