| java.lang.Object org.objectweb.celtix.common.util.Base64Utility
Base64Utility | final public class Base64Utility (Code) | | This class converts to/from base64. The alternative conversions include:
encode:
byte[] into String
byte[] into char[]
byte[] into OutStream
byte[] into Writer
decode:
char[] into byte[]
String into byte[]
char[] into OutStream
String into OutStream
|
Method Summary | |
public static byte[] | decode(String id) | public static void | decode(char[] id, int o, int l, OutputStream ostream) | public static void | decode(String id, OutputStream ostream) | public static byte[] | decodeChunk(char[] id, int o, int l) The decode_chunk routine decodes a chunk of data
into its native encoding.
base64 encodes each 3 octets of data into 4 characters from a
limited 64 character set. | public static String | encode(byte[] id) | public static void | encode(byte[] id, int o, int l, Writer writer) | public static char[] | encodeChunk(byte[] id, int o, int l) | public static void | encodeChunk(byte[] id, int o, int l, OutputStream ostream) |
decodeChunk | public static byte[] decodeChunk(char[] id, int o, int l) throws Base64Exception(Code) | | The decode_chunk routine decodes a chunk of data
into its native encoding.
base64 encodes each 3 octets of data into 4 characters from a
limited 64 character set. The 3 octets are joined to form
24 bits which are then split into 4 x 6bit values. Each 6 bit
value is then used as an index into the 64 character table of
base64 chars. If the total data length is not a 3 octet multiple
the '=' char is used as padding for the final 4 char group,
either 1 octet + '==' or 2 octets + '='.
Parameters: id - The input data to be processed Parameters: o - The offset from which to begin processing Parameters: l - The length (bound) at which processing is to end The decoded data exception: Base64Exception - Thrown is processing fails due toformatting exceptions in the encoded data |
encodeChunk | public static char[] encodeChunk(byte[] id, int o, int l)(Code) | | |
|
|