public class Base64
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static char[] |
alphabet |
private static byte[] |
codes |
Modifier | Constructor and Description |
---|---|
private |
Base64() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
decode(char[] data)
Decodes a BASE-64 encoded stream to recover the original
data.
|
static char[] |
encode(byte[] data)
returns an array of base64-encoded characters to represent the
passed data array.
|
static void |
main(java.lang.String[] args)
Entry point.
|
private static byte[] |
readBytes(java.io.File file) |
private static char[] |
readChars(java.io.File file) |
private static void |
writeBytes(java.io.File file,
byte[] data) |
private static void |
writeChars(java.io.File file,
char[] data) |
public static char[] encode(byte[] data)
data
- the array of bytes to encodepublic static byte[] decode(char[] data)
data
- the character data.public static void main(java.lang.String[] args)
args
- the command line arguments.private static byte[] readBytes(java.io.File file)
private static char[] readChars(java.io.File file)
private static void writeBytes(java.io.File file, byte[] data)
private static void writeChars(java.io.File file, char[] data)