|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javazoom.download.util.Base64
Base64 encoding/decoding implementation as described in section (6.8.) of RFC 2045.
Field Summary | |
static char[] |
translationTable
the Base64 translation table; does the same as 'encode()', but this way decoding should be faster. |
Constructor Summary | |
Base64()
|
Method Summary | |
static char |
decode(char a)
Decodes a Base64 character into its 6-bit value (0..63). |
static char[] |
decode(char[] text)
Decodes Base64 formatted byte array or string into a char array. |
static char[] |
decode(java.lang.String text)
Decodes Base64 formatted byte array or string into a char array. |
static byte[] |
decodeToByteArray(char[] text)
|
static byte[] |
decodeToByteArray(java.lang.String text)
|
static char[] |
encode(char[] text)
Encode char array to Base64 formatted char array. |
static char |
encode(int a)
Encodes a 6-bit value (0..63) into a Base64 character. |
static char[] |
encode(java.lang.String text)
Encode string to Base64 formatted char array. |
static void |
setLbcs(char[] l)
set the line break chracters for use in encoding output. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final char[] translationTable
Constructor Detail |
public Base64()
Method Detail |
public static char[] encode(java.lang.String text)
text
- This argument must contain the text or binary data that shall be
encoded. This version of the 'encode()' method accepts a String and
converts all line breaks to CRLF (or whatever else you have
defined by using 'setLbcs()') prior to encoding.
"CRLF" is equal to the Java string "\r\n".public static char[] encode(char[] text)
text
- This argument must contain the text or binary data that shall be
encoded. This version of the 'encode()' method accepts a char array
as input and will - in contrast to the other 'encode()' method -
not try to do any conversion at all.public static char[] decode(java.lang.String text)
text
- This argument must contain the text or data as a string
object which shall be decoded.public static byte[] decodeToByteArray(java.lang.String text)
public static byte[] decodeToByteArray(char[] text)
public static char[] decode(char[] text)
text
- This argument must contain the text or data as a char
array object which shall be decoded.public static char decode(char a)
public static char encode(int a)
public static void setLbcs(char[] l)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |