JADE_SL
Class Base64

java.lang.Object
  extended byJADE_SL.Base64

public class Base64
extends java.lang.Object

Provides encoding of raw bytes to base64-encoded characters, and decoding of base64 characters to raw bytes.

Version:
1.0
Author:
Kevin Kelley (kelley@iguana.ruralnet.net)

Field Summary
private static char[] alphabet
           
private static byte[] codes
           
 
Constructor Summary
Base64()
           
 
Method Summary
static byte[] decode(char[] data)
          Returns an array of bytes which were encoded in the passed character array.
static char[] encode(byte[] data)
          returns an array of base64-encoded characters to represent the passed data array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

alphabet

private static char[] alphabet

codes

private static byte[] codes
Constructor Detail

Base64

public Base64()
Method Detail

encode

public static char[] encode(byte[] data)
returns an array of base64-encoded characters to represent the passed data array.

Parameters:
data - the array of bytes to encode
Returns:
base64-coded character array.

decode

public static byte[] decode(char[] data)
Returns an array of bytes which were encoded in the passed character array.

Parameters:
data - the array of base64-encoded characters
Returns:
decoded data array


Copyright © 2000-2003 BT Exact Technologies. All Rights Reserved.