org.apache.axiom.om.util
Class Base64

java.lang.Object
  extended by org.apache.axiom.om.util.Base64

public class Base64
extends java.lang.Object


Field Summary
private static char[] S_BASE64CHAR
           
private static char S_BASE64PAD
           
private static byte[] S_DECODETABLE
           
 
Constructor Summary
Base64()
           
 
Method Summary
static byte[] decode(char[] data, int off, int len)
           
static void decode(char[] data, int off, int len, java.io.OutputStream ostream)
           
static byte[] decode(java.lang.String data)
           
static void decode(java.lang.String data, java.io.OutputStream ostream)
           
private static int decode0(char[] ibuf, byte[] obuf, int wp)
           
static java.lang.String encode(byte[] data)
          Returns base64 representation of specified byte array.
static java.lang.String encode(byte[] data, int off, int len)
          Returns base64 representation of specified byte array.
static void encode(byte[] data, int off, int len, java.io.OutputStream ostream)
          Outputs base64 representation of the specified byte array to a byte stream.
static void encode(byte[] data, int off, int len, java.lang.StringBuffer buffer)
          Outputs base64 representation of the specified byte array to the specified String Buffer
static void encode(byte[] data, int off, int len, java.io.Writer writer)
          Outputs base64 representation of the specified byte array to a character stream.
static boolean isValidBase64Encoding(java.lang.String data)
          checks input string for invalid Base64 characters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

S_BASE64CHAR

private static final char[] S_BASE64CHAR

S_BASE64PAD

private static final char S_BASE64PAD
See Also:
Constant Field Values

S_DECODETABLE

private static final byte[] S_DECODETABLE
Constructor Detail

Base64

public Base64()
Method Detail

decode0

private static int decode0(char[] ibuf,
                           byte[] obuf,
                           int wp)

decode

public static byte[] decode(char[] data,
                            int off,
                            int len)

decode

public static byte[] decode(java.lang.String data)

isValidBase64Encoding

public static boolean isValidBase64Encoding(java.lang.String data)
checks input string for invalid Base64 characters

Parameters:
data -
Returns:
true, if String contains only valid Base64 characters. false, otherwise

decode

public static void decode(char[] data,
                          int off,
                          int len,
                          java.io.OutputStream ostream)
                   throws java.io.IOException
Throws:
java.io.IOException

decode

public static void decode(java.lang.String data,
                          java.io.OutputStream ostream)
                   throws java.io.IOException
Throws:
java.io.IOException

encode

public static java.lang.String encode(byte[] data)
Returns base64 representation of specified byte array.


encode

public static java.lang.String encode(byte[] data,
                                      int off,
                                      int len)
Returns base64 representation of specified byte array.


encode

public static void encode(byte[] data,
                          int off,
                          int len,
                          java.lang.StringBuffer buffer)
Outputs base64 representation of the specified byte array to the specified String Buffer


encode

public static void encode(byte[] data,
                          int off,
                          int len,
                          java.io.OutputStream ostream)
                   throws java.io.IOException
Outputs base64 representation of the specified byte array to a byte stream.

Throws:
java.io.IOException

encode

public static void encode(byte[] data,
                          int off,
                          int len,
                          java.io.Writer writer)
                   throws java.io.IOException
Outputs base64 representation of the specified byte array to a character stream.

Throws:
java.io.IOException