net.simplace.util.service.Base64

Simple Base64 encoder/decoder without any special output formatting etc.


public class Base64 {


// Class Methods
public static String encode(String aData);

Delegates the other encode method. It just reduces the coding efforts.
returns encoded String
public static char[] encode(byte[] aData);

Encode an array of raw byte values to an array of characters using the BASE-64 encoding scheme.
returns BASE-64 encoded character array.
public static String decode(String aData) throws DecodingFailedException;

Delegates the other decode method. It just reduces the coding efforts.
returns decoded String
public static byte[] decode(char[] aData) throws DecodingFailedException;

Decode a BASE-64 encoded array of characters to recover the original data. White space before and after will be trimmed away, but no other manipulation of the input will be performed. This method will properly handle input containing junk characters (newlines and the like) rather than throwing an exception. It does this by pre-parsing the input and generating from that a count of VALID input characters.
returns original data


}