com.mongodb.util
Class Base64Codec

java.lang.Object
  extended by com.mongodb.util.Base64Codec

public class Base64Codec
extends Object

Provides Base64 encoding and decoding .

This class implements Base64 encoding

Thanks to Apache Commons project. This class refactored from org.apache.commons.codec.binary

Original Thanks to "commons" project in ws.apache.org for this code. http://svn.apache.org/repos/asf/webservices/commons/trunk/modules/util/


Constructor Summary
Base64Codec()
           
 
Method Summary
 byte[] decode(String s)
          Translates the specified Base64 string into a byte array.
 String encode(byte[] in)
          Translates the specified byte array into Base64 string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Base64Codec

public Base64Codec()
Method Detail

decode

public byte[] decode(String s)
Translates the specified Base64 string into a byte array.

Parameters:
s - the Base64 string (not null)
Returns:
the byte array (not null)

encode

public String encode(byte[] in)
Translates the specified byte array into Base64 string.

Parameters:
in - the byte array (not null)
Returns:
the translated Base64 string (not null)