com.funambol.util
Class QuotedPrintable

java.lang.Object
  extended by com.funambol.util.QuotedPrintable

public class QuotedPrintable
extends java.lang.Object

A class containing static methods to perform decoding from quoted printable content transfer encoding and to encode into


Constructor Summary
QuotedPrintable()
           
 
Method Summary
static int decode(byte[] qp)
          A method to decode quoted printable encoded data.
static java.lang.String decode(byte[] qp, java.lang.String enc)
           
static java.lang.String encode(java.lang.String stringToEncode, java.lang.String enc)
          A method to encode String in quoted printable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuotedPrintable

public QuotedPrintable()
Method Detail

decode

public static int decode(byte[] qp)
A method to decode quoted printable encoded data. It overrides the same input byte array to save memoty. Can be done because the result is surely smaller than the input.

Parameters:
qp - a byte array to decode.
Returns:
the length of the decoded array.

decode

public static java.lang.String decode(byte[] qp,
                                      java.lang.String enc)

encode

public static java.lang.String encode(java.lang.String stringToEncode,
                                      java.lang.String enc)
A method to encode String in quoted printable

Parameters:
content - The string to be encoded enc The charset
Returns:
the encoded string.


Copyright © 2006 Funambol.