public class Base64
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static byte[] |
decode(java.lang.String s)
A Base64 decoder.
|
static java.lang.String |
encode(byte[] src)
base-64 encode a byte array
|
static java.lang.String |
encode(byte[] src,
int start,
int length)
base-64 encode a byte array
|
static java.lang.String |
encode(java.lang.String s)
base-64 encode a string
|
static void |
main(java.lang.String[] args)
Test the decoder and encoder.
|
public static java.lang.String encode(java.lang.String s)
s
- The ascii string to encodepublic static java.lang.String encode(byte[] src)
src
- The byte array to encodepublic static java.lang.String encode(byte[] src, int start, int length)
src
- The byte array to encodestart
- The starting indexlen
- The number of bytespublic static byte[] decode(java.lang.String s)
s
- a Base64 encoded stringpublic static void main(java.lang.String[] args)
Base64 [string]
.