org.apache.james.mime4j.codec
public class DecoderUtil extends Object
Constructor and Description |
---|
DecoderUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
decodeB(String encodedWord,
String charset)
Decodes an encoded word encoded with the 'B' encoding (described in
RFC 2047) found in a header field body.
|
static byte[] |
decodeBase64(String s)
Decodes a string containing base64 encoded data.
|
static byte[] |
decodeBaseQuotedPrintable(String s)
Decodes a string containing quoted-printable encoded data.
|
static String |
decodeEncodedWords(String body)
Decodes a string containing encoded words as defined by RFC 2047.
|
static String |
decodeQ(String encodedWord,
String charset)
Decodes an encoded word encoded with the 'Q' encoding (described in
RFC 2047) found in a header field body.
|
public static byte[] decodeBaseQuotedPrintable(String s)
s
- the string to decode.public static byte[] decodeBase64(String s)
s
- the string to decode.public static String decodeB(String encodedWord, String charset) throws UnsupportedEncodingException
encodedWord
- the encoded word to decode.charset
- the Java charset to use.UnsupportedEncodingException
- if the given Java charset isn't
supported.public static String decodeQ(String encodedWord, String charset) throws UnsupportedEncodingException
encodedWord
- the encoded word to decode.charset
- the Java charset to use.UnsupportedEncodingException
- if the given Java charset isn't
supported.public static String decodeEncodedWords(String body)
body
- the string to decode.Copyright © 2004–2014 The Apache Software Foundation. All rights reserved.