org.locomotive.util
Class Base64

java.lang.Object
  |
  +--org.locomotive.util.Base64

public class Base64
extends java.lang.Object

Utility routine for manipulating blocks of Base64 data


Field Summary
protected static byte[] base64lookup
           
protected static byte[] base64reverse_lookup
           
 
Constructor Summary
Base64()
           
 
Method Summary
static byte[] base64Decode(byte[] input)
          decodes input base64, returns binary byte array.
static byte[] base64Encode(byte[] input)
          convert a byte array to a base64 byte array output is 4/3 size of input, plus extra 4 bytes 66% of the time
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

base64lookup

protected static byte[] base64lookup

base64reverse_lookup

protected static byte[] base64reverse_lookup
Constructor Detail

Base64

public Base64()
Method Detail

base64Encode

public static byte[] base64Encode(byte[] input)
convert a byte array to a base64 byte array output is 4/3 size of input, plus extra 4 bytes 66% of the time
Parameters:
input - an array of binary byte data

base64Decode

public static byte[] base64Decode(byte[] input)
decodes input base64, returns binary byte array. May throw IllegalArgumentException is the input is not valid Base64-text
Parameters:
input - a byte array containing Base64-text