|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--codec.Base64
Encodes and decodes data according to Base64 encoding as described in RFC 1521. Encoded data is broken into lines of 76 charcters each (19 groups of 4 characters which represent 3 bytes of input per group.
The three input bytes are divided into four groups of six bits each which are
encoded according to the table base64 given below.
| Method Summary | |
static byte[] |
decode(byte[] code)
Decodes a given byte array containing Unicode BASE_LATIN encoded characters with one byte encoding per character. |
static byte[] |
decode(String input)
Decodes a Base64 encoded string into an array of bytes with exactly the length of the encoded data. |
static String |
encode(byte[] input)
Encodes the input array of bytes into a Base64 encoded string with padding if required. |
static String |
toHex(byte[] b)
Encodes a byte array into a hexadecimal string representation. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static String encode(byte[] input)
input - The byte array to be encoded.
public static byte[] decode(String input)
throws CorruptedCodeException
input - The encoded Base64 character String.CorruptedCodeException - if the Base64 code contains errors such as a missing
character or bad padding.
public static byte[] decode(byte[] code)
throws CorruptedCodeException
byte[] decode(String).code - The BASE_LATIN Base64 encoded input with one byte per
character.CorruptedCodeException - if the decoding process revealed errors such as bad
padding or missing charcters.public static String toHex(byte[] b)
b - The input byte array.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||