com.funambol.util
Class Base64

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

public class Base64
extends java.lang.Object


Constructor Summary
Base64()
           
 
Method Summary
static byte[] decode(byte[] data)
          decode the base 64 encoded input data.
static java.lang.String decode(byte[] data, java.lang.String charset)
          Decode the string and convert back the decoded value into a string using the specified charset.
static byte[] decode(java.lang.String data)
          decode the base 64 encoded String data.
static java.lang.String decode(java.lang.String data, java.lang.String charset)
          Decode the string and convert back the decoded value into a string using the specified charset.
static byte[] encode(byte[] data)
          encode the input data producong a base 64 encoded byte array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Base64

public Base64()
Method Detail

encode

public static byte[] encode(byte[] data)
encode the input data producong a base 64 encoded byte array.

Returns:
a byte array containing the base 64 encoded data.

decode

public static byte[] decode(byte[] data)
decode the base 64 encoded input data.

Returns:
a byte array representing the decoded data.

decode

public static byte[] decode(java.lang.String data)
decode the base 64 encoded String data. TODO: Use the byte version to avoid duplication?

Returns:
a byte array representing the decoded data.

decode

public static java.lang.String decode(java.lang.String data,
                                      java.lang.String charset)
Decode the string and convert back the decoded value into a string using the specified charset. Use default encoding if charset is null or invalid.


decode

public static java.lang.String decode(byte[] data,
                                      java.lang.String charset)
Decode the string and convert back the decoded value into a string using the specified charset. Use default encoding if charset is null or invalid.



Copyright © 2006 Funambol.