xsul.xsd_type_handler.util
Class Base64

java.lang.Object
  extended byxsul.xsd_type_handler.util.Base64

public class Base64
extends java.lang.Object

This is utility class to handle BAS64 encoding and decoding. For deatils see RFC 2045.

NOTE: Decoding is forgiving: spaces etc. are ignored at the beginngin and the end of input and as well inside encoded data - there is also no limit on maximum size of one input line - all data may be just encoded in one line - good for SOAP base64 encoding.

Version:
$Revision: 1.1 $ $Date: 2004/04/25 20:42:44 $ (GMT)
Author:
Aleksander Slominski

Constructor Summary
Base64()
           
 
Method Summary
static byte[] decode(Base64DecodingState state, char[] data, int off, int len, boolean finalize)
           
static byte[] decode(char[] data)
           
static byte[] decode(char[] data, int off, int len)
           
static char[] encode(Base64EncodingState state, byte[] data, int off, int len, boolean finalize)
           
static char[] encode(byte[] data)
           
static char[] encode(byte[] data, int off, int len)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Base64

public Base64()
Method Detail

decode

public static byte[] decode(Base64DecodingState state,
                            char[] data,
                            int off,
                            int len,
                            boolean finalize)
                     throws java.lang.RuntimeException
Throws:
java.lang.RuntimeException

decode

public static byte[] decode(char[] data,
                            int off,
                            int len)
                     throws java.lang.RuntimeException
Throws:
java.lang.RuntimeException

decode

public static byte[] decode(char[] data)
                     throws java.lang.RuntimeException
Throws:
java.lang.RuntimeException

encode

public static char[] encode(Base64EncodingState state,
                            byte[] data,
                            int off,
                            int len,
                            boolean finalize)
                     throws java.lang.RuntimeException
Throws:
java.lang.RuntimeException

encode

public static char[] encode(byte[] data,
                            int off,
                            int len)
                     throws java.lang.RuntimeException
Throws:
java.lang.RuntimeException

encode

public static char[] encode(byte[] data)
                     throws java.lang.RuntimeException
Throws:
java.lang.RuntimeException


IU Extreme! Lab (http://www.extreme.indiana.edu)