wox.serial
Class EncodeBase64

java.lang.Object
  extended by wox.serial.EncodeBase64

public class EncodeBase64
extends java.lang.Object

The EncodeBase64 class provides methods to encode and decode byte arrays to and from base64 encoding.

Version:
EncodeBase64.java - 1.0
Author:
Carlos R. Jaimez Gonzalez
Simon M. Lucas

Constructor Summary
EncodeBase64()
           
 
Method Summary
static byte[] decode(byte[] source)
          Very low-level access to decoding ASCII characters in the form of a byte array.
static byte[] encode(byte[] source)
          This method encodes an array of bytes to Base64.
static void main(java.lang.String[] args)
          Test method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EncodeBase64

public EncodeBase64()
Method Detail

encode

public static byte[] encode(byte[] source)
This method encodes an array of bytes to Base64.

Parameters:
source - The original array of bytes to be converted.
Returns:
The encoded array of bytes

decode

public static byte[] decode(byte[] source)
Very low-level access to decoding ASCII characters in the form of a byte array. Does not support automatically gunzipping or any other "fancy" features.

Parameters:
source - The Base64 encoded data (array of byte)
Returns:
The decoded array of bytes

main

public static void main(java.lang.String[] args)
Test method.

Parameters:
args - Arguments for the test method.