|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.wimpi.pim.util.Base64
This class provides methods for encoding and decoding data in MIME base64 format.
The input to the encode
methods is always a byte array.
Strictly speaking the output represents a sequence of characters, but
since these characters are from a subset of both the Unicode and ASCII
character repertoires, it is possible to express the output either as
a String or as a byte array.
References:
Field Summary | |
protected static byte[] |
dec_table
A static array that maps ASCII code points to a 6-bit integer, or -1 for an invalid code point. |
protected static char[] |
enc_table
A static array that maps 6-bit integers to a specific char. |
Method Summary | |
static byte[] |
decode(byte[] data)
Decodes a byte array containing base64-encoded ASCII. |
static byte[] |
encode(byte[] data)
Encodes data as a byte array using base64 encoding. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final char[] enc_table
protected static final byte[] dec_table
Method Detail |
public static final byte[] encode(byte[] data)
public static final byte[] decode(byte[] data)
java.lang.IllegalArgumentException
- if data contains invalid characters,
i.e. not codes 0-32, 'A'-'Z', 'a'-'z', '+', '/'. or '=', or is
incorrectly padded.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |