|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.data.Base64
public class Base64
Encodes and decodes to and from Base64 notation.
Change Log:
I am placing this code in the Public Domain. Do with it as you will. This software comes with no guarantees or warranties but with plenty of well-wishing instead! Please visit http://iharder.net/xmlizable periodically to check for updates or to contribute improvements.
Modified by jrandom for i2p, using safeEncode / safeDecode to create filesystem and URL safe base64 values (replacing / with ~, and + with -)
Method Summary | |
---|---|
static byte[] |
decode(java.lang.String s)
|
static java.lang.String |
decodeToString(java.lang.String s)
Decodes data from Base64 notation and returns it as a string. |
static java.lang.String |
encode(byte[] source)
|
static java.lang.String |
encode(byte[] source,
boolean useStandardAlphabet)
|
static java.lang.String |
encode(byte[] source,
int off,
int len)
|
static java.lang.String |
encode(byte[] source,
int off,
int len,
boolean useStandardAlphabet)
|
static java.lang.String |
encode(java.lang.String source)
added by aum |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String encode(java.lang.String source)
public static java.lang.String encode(byte[] source)
public static java.lang.String encode(byte[] source, int off, int len)
public static java.lang.String encode(byte[] source, boolean useStandardAlphabet)
public static java.lang.String encode(byte[] source, int off, int len, boolean useStandardAlphabet)
public static byte[] decode(java.lang.String s)
public static void main(java.lang.String[] args)
public static java.lang.String decodeToString(java.lang.String s)
new String( decode( s ) )
s
- the strind to decode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |