javax.baja.nre.util
Class Base64

java.lang.Object
  extended byjavax.baja.nre.util.Base64

public class Base64
extends java.lang.Object

Encode and decode binary data in Base 64.


Field Summary
static int HASHHEXLEN
           
static int HASHLEN
           
 
Constructor Summary
Base64()
           
 
Method Summary
static byte[] decode(java.lang.String src)
          Decode the specified source string.
static java.lang.String decodeToString(java.lang.String s)
          Decode the specified source string.
static java.lang.String encode(byte[] buf)
          Encode the specified byte array.
static java.lang.String encode(byte[] buf, int linelen)
          Encode the specified byte array.
static java.lang.String encode(java.lang.String s)
          Encode the specified string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HASHLEN

public static final int HASHLEN
See Also:
Constant Field Values

HASHHEXLEN

public static final int HASHHEXLEN
See Also:
Constant Field Values
Constructor Detail

Base64

public Base64()
Method Detail

encode

public static java.lang.String encode(java.lang.String s)
Encode the specified string.


encode

public static java.lang.String encode(byte[] buf)
Encode the specified byte array.


encode

public static java.lang.String encode(byte[] buf,
                                      int linelen)
Encode the specified byte array.

Parameters:
linelen - the number of characters per line in the output, -1 indicates no line breaks

decode

public static byte[] decode(java.lang.String src)
Decode the specified source string.


decodeToString

public static java.lang.String decodeToString(java.lang.String s)
Decode the specified source string.