be.cardon.utils
Class Base64Utils

java.lang.Object
  extended by be.cardon.utils.Base64Utils

public class Base64Utils
extends java.lang.Object

Base64 encoder and decoder (RFC-2045)


Method Summary
static byte[] base64Decode(java.lang.String aData)
          Decodes the given Base64-encoded data, as specified in RFC-2045 (Section 6.8).
static java.lang.String base64Encode(byte[] aData)
          Encodes the given byte[] using the Base64-encoding, as specified in RFC-2045 (Section 6.8).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

base64Encode

public static java.lang.String base64Encode(byte[] aData)
Encodes the given byte[] using the Base64-encoding, as specified in RFC-2045 (Section 6.8).

Parameters:
aData - the data to be encoded
Returns:
the Base64-encoded aData
Throws:
java.lang.IllegalArgumentException - if NULL or empty array is passed

base64Decode

public static byte[] base64Decode(java.lang.String aData)
Decodes the given Base64-encoded data, as specified in RFC-2045 (Section 6.8).

Parameters:
aData - the Base64-encoded aData.
Returns:
the decoded aData.
Throws:
java.lang.IllegalArgumentException - if NULL or empty data is passed