public final class Base64Utility
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
decode(char[] id,
int o,
int l,
java.io.OutputStream ostream) |
static byte[] |
decode(java.lang.String id) |
static void |
decode(java.lang.String id,
java.io.OutputStream ostream) |
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. |
static java.lang.String |
encode(byte[] id) |
static void |
encode(byte[] id,
int o,
int l,
java.io.Writer writer) |
static java.lang.String |
encode(java.io.InputStream in) |
static char[] |
encodeChunk(byte[] id,
int o,
int l) |
static void |
encodeChunk(byte[] id,
int o,
int l,
java.io.OutputStream ostream) |
public static byte[] decodeChunk(char[] id,
int o,
int l)
throws Base64Exception
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 + '='.id - The input data to be processedo - The offset from which to begin processingl - The length (bound) at which processing is to endBase64Exception - Thrown is processing fails due to formatting exceptions in the encoded datapublic static byte[] decode(java.lang.String id)
throws Base64Exception
Base64Exceptionpublic static void decode(char[] id,
int o,
int l,
java.io.OutputStream ostream)
throws Base64Exception
Base64Exceptionpublic static void decode(java.lang.String id,
java.io.OutputStream ostream)
throws Base64Exception
Base64Exceptionpublic static java.lang.String encode(java.io.InputStream in)
throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String encode(byte[] id)
public static char[] encodeChunk(byte[] id,
int o,
int l)
public static void encodeChunk(byte[] id,
int o,
int l,
java.io.OutputStream ostream)
throws Base64Exception
Base64Exceptionpublic static void encode(byte[] id,
int o,
int l,
java.io.Writer writer)
throws Base64Exception
Base64ExceptionCopyright © 2019. All Rights Reserved.