|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--iglu.util.Base64
Basically, the problem is that sometimes you want to store binary objects where you only have text storage facilities. This converts an array of bytes to and from printable only characters so you can store any set of bytes where only text storage is availabe.
This code comes from the book _Java Crypotgraphy_ by Jonathan Knudsen published by O'Reilly. It's inclusion in IGLU is in accordance with O'Reilly's fair use policy as noted at: http://www.oreilly.com/ask_tim/codepolicy_1101.html.
Constructor Summary | |
Base64()
|
Method Summary | |
static byte[] |
decode(java.lang.String base64)
Decode the string to its equivalent non-printable byte array |
static java.lang.String |
encode(byte[] raw)
encode the given byte array as a printable string |
protected static char[] |
encodeBlock(byte[] raw,
int offset)
Encode the indicated block |
protected static char |
getChar(int sixBit)
|
protected static int |
getValue(char c)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Base64()
Method Detail |
public static java.lang.String encode(byte[] raw)
protected static char[] encodeBlock(byte[] raw, int offset)
protected static char getChar(int sixBit)
public static byte[] decode(java.lang.String base64)
protected static int getValue(char c)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |