com.jxml.quick
Class Base64

java.lang.Object
  |
  +--com.jxml.quick.Base64

public class Base64
extends Object

Base64 is a standard for passing binary data as ASCII. RFC 2045

Quick 1.1


Constructor Summary
Base64()
           
 
Method Summary
static byte[] ascToBin(byte[] asc)
           
static byte[] binToAsc(byte[] bin)
          Convert an array of binary bytes to an array of ASCII bytes.
 
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

ascToBin

public static byte[] ascToBin(byte[] asc)
                       throws Invalid64Exception

binToAsc

public static byte[] binToAsc(byte[] bin)
Convert an array of binary bytes to an array of ASCII bytes.

ASCII characters used are A-Z, a-z, 0-9, /, and +. The '=' is used to pad the ascii to a multiple of 4 bytes.

Parameters:
bin - The binary data.
Returns:
The equivalant ASCII data.