org.directwebremoting.util
Class Base64

java.lang.Object
  extended by org.directwebremoting.util.Base64

public class Base64
extends java.lang.Object

This class provides encode/decode for RFC 2045 Base64 as defined by RFC 2045, N. Freed and N. Borenstein. RFC 2045: Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies. Reference 1996

Since:
1.0-dev
Author:
Jeffrey Rodriguez, Daniel Rall, Martin Redington

Constructor Summary
Base64()
           
 
Method Summary
 byte[] decode(byte[] pArray)
           
 java.lang.Object decode(java.lang.Object pObject)
           
static byte[] decodeBase64(byte[] base64Data)
          Decodes Base64 data into octects
 byte[] encode(byte[] pArray)
           
 java.lang.Object encode(java.lang.Object pObject)
          encode an Object
static byte[] encodeBase64(byte[] binaryData)
           
static byte[] encodeBase64(byte[] binaryData, boolean isChunked)
          Encodes hex octects into Base64.
static byte[] encodeBase64Chunked(byte[] binaryData)
           
static boolean isArrayByteBase64(byte[] arrayOctect)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Base64

public Base64()
Method Detail

isArrayByteBase64

public static boolean isArrayByteBase64(byte[] arrayOctect)

encodeBase64

public static byte[] encodeBase64(byte[] binaryData)

encodeBase64Chunked

public static byte[] encodeBase64Chunked(byte[] binaryData)

decode

public java.lang.Object decode(java.lang.Object pObject)
                        throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

decode

public byte[] decode(byte[] pArray)
              throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

encodeBase64

public static byte[] encodeBase64(byte[] binaryData,
                                  boolean isChunked)
Encodes hex octects into Base64.

Parameters:
binaryData - Array containing binary data to encode.
Returns:
Base64-encoded data.

decodeBase64

public static byte[] decodeBase64(byte[] base64Data)
Decodes Base64 data into octects

Parameters:
base64Data - Byte array containing Base64 data
Returns:
Array containing decoded data.

encode

public java.lang.Object encode(java.lang.Object pObject)
                        throws java.lang.IllegalArgumentException
encode an Object

Throws:
java.lang.IllegalArgumentException

encode

public byte[] encode(byte[] pArray)
              throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

Copyright 2008