02/28/2005
 

com.epicentric.common
Class Base64Utils

java.lang.Object
  |
  +--com.epicentric.common.Base64Utils

Deprecated. as of 4.5, to be removed in 8.0 or later. This class will be moved to the com.vignette.portal.util package.

public class Base64Utils
extends Object

Utility methods to convert to and from Base 64 encoding.

The implementation comes from the Bond Project at Purdue University.


Constructor Summary
Base64Utils()
          Deprecated.  
 
Method Summary
static String decode(String encodedString)
          Deprecated. as of 4.5, to be removed in 8.0 or later. Replaced with Base64Utils.decode(String).
static byte[] decodeGetBytes(String base64)
          Deprecated. as of 4.5, to be removed in 8.0 or later. Replaced with Base64Utils.decodeGetBytes(String).
static String encode(byte[] raw)
          Deprecated. as of 4.5, to be removed in 8.0 or later. Replaced with Base64Utils.encode(byte[]).
static String encode(String target)
          Deprecated. as of 4.5, to be removed in 8.0 or later. Replaced with Base64Utils.encode(String).
protected static char[] encodeBlock(byte[] raw, int offset)
          Deprecated.  
protected static char getChar(int sixbit)
          Deprecated.  
protected static int getValue(char c)
          Deprecated.  
static Object String2Object(String s)
          Deprecated. as of 4.5, to be removed in 8.0 or later. No replacement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Base64Utils

public Base64Utils()
Deprecated. 
Method Detail

encode

public static String encode(String target)
Deprecated. as of 4.5, to be removed in 8.0 or later. Replaced with Base64Utils.encode(String).

Encodes a string to Base 64. It is not Unicode safe.
Parameters:
target - String to be encoded
Returns:
Base 64-encoded string, the empty string for an empty string input, or null for a null input.

decode

public static String decode(String encodedString)
Deprecated. as of 4.5, to be removed in 8.0 or later. Replaced with Base64Utils.decode(String).

Decodes a Base 64-encoded string. It is not Unicode safe.
Parameters:
encodedString - String to be decoded
Returns:
Decoded string, the empty string for an empty string input, or null for a null input.

encode

public static String encode(byte[] raw)
Deprecated. as of 4.5, to be removed in 8.0 or later. Replaced with Base64Utils.encode(byte[]).

Encodes a byte array to Base 64.
Parameters:
raw - Byte array to be encoded
Returns:
Base 64-encoded string, the empty string for an empty array input, or null for a null input.

encodeBlock

protected static char[] encodeBlock(byte[] raw,
                                    int offset)
Deprecated. 

getChar

protected static char getChar(int sixbit)
Deprecated. 

decodeGetBytes

public static byte[] decodeGetBytes(String base64)
Deprecated. as of 4.5, to be removed in 8.0 or later. Replaced with Base64Utils.decodeGetBytes(String).

Decodes a Base 64-encoded byte array.
Parameters:
base64 - Byte array to be decoded
Returns:
Decoded array, or null for null input, an empty array input, or certain forms of badly formatted input.

getValue

protected static int getValue(char c)
Deprecated. 

String2Object

public static Object String2Object(String s)
Deprecated. as of 4.5, to be removed in 8.0 or later. No replacement.

Decodes a Base 64-encoded string and converts the resulting byte array to an object.
Parameters:
s - Base 64-encoded string of the byte array representing a serialized object
Returns:
Object resulting from decoding the string, or null for null or invalid input.

02/28/2005
 

Copyright and Trademark Notices