Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.protocol.msn.mail.utils
Class MimeUtility

java.lang.Object
  extended by net.java.sip.communicator.impl.protocol.msn.mail.utils.MimeUtility

public class MimeUtility
extends Object

This is a utility class providing micellaneous MIME-related functionality.

Version:
1.4
Author:
Chris Burdess

Method Summary
static String decodeText(String etext)
          Decodes headers that are defined as '*text' in RFC 822.
static String decodeWord(String text)
          Decodes the specified string using the RFC 2047 rules for parsing an "encoded-word".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

decodeText

public static String decodeText(String etext)
                         throws UnsupportedEncodingException
Decodes headers that are defined as '*text' in RFC 822.

Parameters:
etext - the possibly encoded value
Returns:
decoded text
Throws:
UnsupportedEncodingException - if the charset conversion failed

decodeWord

public static String decodeWord(String text)
                         throws Exception,
                                UnsupportedEncodingException
Decodes the specified string using the RFC 2047 rules for parsing an "encoded-word".

Parameters:
text - the possibly encoded value
Returns:
decoded word
Throws:
Exception - if the string is not an encoded-word
UnsupportedEncodingException - if the decoding failed

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.