org.apache.james.mime4j.codec
Class DecoderUtil

java.lang.Object
  extended by org.apache.james.mime4j.codec.DecoderUtil

public class DecoderUtil
extends java.lang.Object

Static methods for decoding strings, byte arrays and encoded words.


Constructor Summary
DecoderUtil()
           
 
Method Summary
static java.lang.String decodeEncodedWords(java.lang.String body, DecodeMonitor monitor)
          Decodes a string containing encoded words as defined by RFC 2047.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DecoderUtil

public DecoderUtil()
Method Detail

decodeEncodedWords

public static java.lang.String decodeEncodedWords(java.lang.String body,
                                                  DecodeMonitor monitor)
                                           throws java.lang.IllegalArgumentException
Decodes a string containing encoded words as defined by RFC 2047. Encoded words have the form =?charset?enc?encoded-text?= where enc is either 'Q' or 'q' for quoted-printable and 'B' or 'b' for base64.

Parameters:
body - the string to decode
monitor - the DecodeMonitor to be used.
Returns:
the decoded string.
Throws:
java.lang.IllegalArgumentException - only if the DecodeMonitor strategy throws it (Strict parsing)


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.