com.alarexgroup.m2mplf.util
Class Base64

java.lang.Object
  extended by com.alarexgroup.m2mplf.util.Base64
public class Base64
extends java.lang.Object

This class codes and decodes BASE64 which is often used for email communication.

Field Summary
protected static byte[] base64Chars
           
protected static byte[] reverseBase64Chars
           
 
Method Summary
static byte[] decode(byte[] bytes)
          Dates decoding from BASE64
static boolean decode(java.io.InputStream dataIn, java.io.OutputStream dataOut)
          Dates decoding - from BASE64
static byte[] encode(byte[] bytes)
          Codes dates into BASE64
static byte[] encode(byte[] bytes, int offset, int length)
           
static boolean encode(java.io.InputStream dataIn, java.io.OutputStream dataOut)
          Codes dates into BASE64
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

base64Chars

protected static final byte[] base64Chars

reverseBase64Chars

protected static final byte[] reverseBase64Chars
Method Detail

encode

public static byte[] encode(byte[] bytes)
Codes dates into BASE64

Parameters:
bytes - dates for coding
Returns:
coded dates

encode

public static byte[] encode(byte[] bytes,
                            int offset,
                            int length)

encode

public static boolean encode(java.io.InputStream dataIn,
                             java.io.OutputStream dataOut)
Codes dates into BASE64

Parameters:
dataIn - dates for coding
dataOut - coded dates
Returns:
true - success

decode

public static byte[] decode(byte[] bytes)
Dates decoding from BASE64

Parameters:
bytes - coded dates
Returns:
decoded dates

decode

public static boolean decode(java.io.InputStream dataIn,
                             java.io.OutputStream dataOut)
Dates decoding - from BASE64

Parameters:
dataIn - coded dates
dataOut - decoded dates
Returns:
true - success