|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opengts.util.Base64
public class Base64
Base64 encoding/decoding tools
| Nested Class Summary | |
|---|---|
static class |
Base64.Base64DecodeException
Base64 Decode Parse Exception |
| Field Summary | |
|---|---|
static char[] |
Base64Alphabet
The Standard Base64 alphabet |
static char[] |
Base64HttpAlpha
An HTTP-Safe Base64 alphabet |
static char |
Base64Pad
The Base64 padding character |
| Constructor Summary | |
|---|---|
Base64()
|
|
| Method Summary | |
|---|---|
protected static int |
_decodeChar(char ch,
char[] alpha)
Returns the index of the specified character in the specified array |
protected static char |
_encodeChar(int ndx,
char[] alpha)
Returns a character from the specified alphabet based on the specified index |
static byte[] |
decode(java.lang.String b64Str)
Decodes the specified String based on the Base64 alphabet |
static byte[] |
decode(java.lang.String b64Str,
java.math.BigInteger seed)
Decodes the specified String based on a scambled Base64 alphabet |
static byte[] |
decode(java.lang.String b64Str,
char[] alpha)
Decodes the specified String based on the specified alphabet |
static byte[] |
decode(java.lang.String b64Str,
char[] alpha,
char pad)
Decodes the specified String based on the specified alphabet |
static byte[] |
decode(java.lang.String b64Str,
long seed)
Decodes the specified String based on a scambled Base64 alphabet |
static java.lang.String |
encode(byte[] buff)
Encodes the specified byte array based on the Base64 alphabet |
static java.lang.String |
encode(byte[] buff,
java.math.BigInteger seed)
Encodes the specified byte array based on a shuffled Base64 alphabet |
static java.lang.String |
encode(byte[] buff,
java.math.BigInteger seed,
char pad)
Encodes the specified byte array based on a shuffled Base64 alphabet |
static java.lang.String |
encode(byte[] buff,
char[] alpha)
Encodes the specified byte array based on the specified alphabet |
static java.lang.String |
encode(byte[] buff,
char[] alpha,
char pad)
Encodes the specified byte array based on the specified alphabet |
static java.lang.String |
encode(byte[] buff,
long seed)
Encodes the specified byte array based on a shuffled Base64 alphabet |
static java.lang.String |
encode(byte[] buff,
long seed,
char pad)
Encodes the specified byte array based on a shuffled Base64 alphabet |
static java.lang.String |
encode(java.lang.String str)
Encodes the specified String based on the Base64 alphabet |
static java.lang.String |
encode(java.lang.String str,
java.math.BigInteger seed)
Encodes the specified String based on the Base64 alphabet |
static java.lang.String |
encode(java.lang.String str,
java.math.BigInteger seed,
char pad)
Encodes the specified String based on the Base64 alphabet |
static java.lang.String |
encode(java.lang.String str,
long seed)
Encodes the specified String based on the Base64 alphabet |
static java.lang.String |
encode(java.lang.String str,
long seed,
char pad)
Encodes the specified String based on the Base64 alphabet |
static void |
main(java.lang.String[] argv)
Main entry point for testing/debugging |
static char[] |
shuffleAlphabet(java.math.BigInteger seed)
return a shuffled Base64 alphabet |
static char[] |
shuffleAlphabet(java.math.BigInteger seed,
char[] alpha)
return a shuffled Base64 alphabet |
static char[] |
shuffleAlphabet(long seed)
return a shuffled Base64 alphabet |
static char[] |
shuffleAlphabet(long seed,
char[] alpha)
return a shuffled Base64 alphabet |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final char Base64Pad
public static final char[] Base64Alphabet
public static final char[] Base64HttpAlpha
| Constructor Detail |
|---|
public Base64()
| Method Detail |
|---|
public static char[] shuffleAlphabet(long seed)
seed - A large number used as a randomizer seed to shuffle the alphabet
public static char[] shuffleAlphabet(long seed,
char[] alpha)
seed - A large number used as a randomizer seed to shuffle the alphabetalpha - Alphabet to shuffle
public static char[] shuffleAlphabet(java.math.BigInteger seed)
seed - A large number used as a randomizer seed to shuffle the alphabet
public static char[] shuffleAlphabet(java.math.BigInteger seed,
char[] alpha)
seed - A large number used as a randomizer seed to shuffle the alphabetalpha - Alphabet to shuffle
protected static char _encodeChar(int ndx,
char[] alpha)
ndx - The character array indexalpha - The character array alphabet
public static java.lang.String encode(java.lang.String str)
str - The String to encode
public static java.lang.String encode(java.lang.String str,
long seed)
str - The String to encodeseed - The randomizer seed used to shuffle the alphabet
public static java.lang.String encode(java.lang.String str,
long seed,
char pad)
str - The String to encodeseed - The randomizer seed used to shuffle the alphabetpad - The padding character
public static java.lang.String encode(java.lang.String str,
java.math.BigInteger seed)
str - The String to encodeseed - The randomizer seed used to shuffle the alphabet
public static java.lang.String encode(java.lang.String str,
java.math.BigInteger seed,
char pad)
str - The String to encodeseed - The randomizer seed used to shuffle the alphabetpad - The padding character
public static java.lang.String encode(byte[] buff)
buff - The byte array to encode
public static java.lang.String encode(byte[] buff,
char[] alpha)
buff - The byte array to encodealpha - The alphabet used to encode the byte array
public static java.lang.String encode(byte[] buff,
char[] alpha,
char pad)
buff - The byte array to encodealpha - The alphabet used to encode the byte arraypad - The padding character
public static java.lang.String encode(byte[] buff,
long seed)
buff - The byte array to encodeseed - The randomizer seed used to shuffle the alphabet
public static java.lang.String encode(byte[] buff,
long seed,
char pad)
buff - The byte array to encodeseed - The randomizer seed used to shuffle the alphabetpad - The padding character
public static java.lang.String encode(byte[] buff,
java.math.BigInteger seed)
buff - The byte array to encodeseed - The randomizer seed used to shuffle the alphabet
public static java.lang.String encode(byte[] buff,
java.math.BigInteger seed,
char pad)
buff - The byte array to encodeseed - The randomizer seed used to shuffle the alphabetpad - The padding character
protected static int _decodeChar(char ch,
char[] alpha)
throws Base64.Base64DecodeException
ch - The target character for which the index is returnedalpha - The character alphabet
Base64.Base64DecodeException
public static byte[] decode(java.lang.String b64Str)
throws Base64.Base64DecodeException
b64Str - The String to decode
Base64.Base64DecodeException
public static byte[] decode(java.lang.String b64Str,
char[] alpha)
throws Base64.Base64DecodeException
b64Str - The String to decodealpha - The character alphabet used to decode the String
Base64.Base64DecodeException
public static byte[] decode(java.lang.String b64Str,
char[] alpha,
char pad)
throws Base64.Base64DecodeException
b64Str - The String to decodealpha - The character alphabet used to decode the Stringpad - The padding character
Base64.Base64DecodeException
public static byte[] decode(java.lang.String b64Str,
long seed)
throws Base64.Base64DecodeException
b64Str - The String to decodeseed - The randomizer seed used to shuffle the alphabet
Base64.Base64DecodeException
public static byte[] decode(java.lang.String b64Str,
java.math.BigInteger seed)
throws Base64.Base64DecodeException
b64Str - The String to decodeseed - The randomizer seed used to shuffle the alphabet
Base64.Base64DecodeExceptionpublic static void main(java.lang.String[] argv)
argv - Comand-line arguments
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||