com.caucho.quercus.lib.i18n
Class QuercusMimeUtility

java.lang.Object
  extended by com.caucho.quercus.lib.i18n.QuercusMimeUtility

public class QuercusMimeUtility
extends java.lang.Object


Constructor Summary
QuercusMimeUtility()
           
 
Method Summary
static StringValue decodeMime(Env env, java.lang.CharSequence word, java.lang.String charset)
          Returns decoded Mime header/field.
static Value decodeMimeHeaders(Env env, StringValue encodedHeaders, java.lang.String charset)
           
static Value encodeMime(Env env, StringValue name, StringValue value, java.lang.String inCharset, java.lang.String outCharset, java.lang.String scheme)
           
static StringValue encodeMime(Env env, StringValue name, StringValue value, java.lang.String inCharset, java.lang.String outCharset, java.lang.String scheme, java.lang.String lineBreakChars, int lineLength)
          Encodes a MIME header.
static java.lang.String encodeMimeWord(java.lang.String value, java.lang.String charset, java.lang.String scheme, java.lang.String lineBreakChars, int lineLength)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuercusMimeUtility

public QuercusMimeUtility()
Method Detail

decodeMimeHeaders

public static Value decodeMimeHeaders(Env env,
                                      StringValue encodedHeaders,
                                      java.lang.String charset)
                               throws java.io.UnsupportedEncodingException
Throws:
java.io.UnsupportedEncodingException

decodeMime

public static StringValue decodeMime(Env env,
                                     java.lang.CharSequence word,
                                     java.lang.String charset)
                              throws java.io.UnsupportedEncodingException
Returns decoded Mime header/field.

Throws:
java.io.UnsupportedEncodingException

encodeMime

public static Value encodeMime(Env env,
                               StringValue name,
                               StringValue value,
                               java.lang.String inCharset,
                               java.lang.String outCharset,
                               java.lang.String scheme)
                        throws java.io.UnsupportedEncodingException
Throws:
java.io.UnsupportedEncodingException

encodeMime

public static StringValue encodeMime(Env env,
                                     StringValue name,
                                     StringValue value,
                                     java.lang.String inCharset,
                                     java.lang.String outCharset,
                                     java.lang.String scheme,
                                     java.lang.String lineBreakChars,
                                     int lineLength)
                              throws java.io.UnsupportedEncodingException
Encodes a MIME header. XXX: preferences

Parameters:
field_name - header field name
field_value - header field value
preferences -
Returns:
encoded mime header
Throws:
java.io.UnsupportedEncodingException

encodeMimeWord

public static java.lang.String encodeMimeWord(java.lang.String value,
                                              java.lang.String charset,
                                              java.lang.String scheme,
                                              java.lang.String lineBreakChars,
                                              int lineLength)
                                       throws java.io.UnsupportedEncodingException
Throws:
java.io.UnsupportedEncodingException