Java Utililty Methods Base64

List of utility methods to do Base64

Description

The list of methods to do Base64 are organized into topic(s).

Method

intbase64toInt(char c, byte[] alphaToInt)
Translates the specified character, which is assumed to be in the "Base 64 Alphabet" into its equivalent 6-bit positive integer.
int result = alphaToInt[c];
if (result < 0) {
    throw new IllegalArgumentException("Illegal character " + c);
return result;
Stringbase64UrlFriendly(String base)
base Url Friendly
return base.replace("+", "-").replace("/", "_").replace("=", "");
intbase64Value(char digit)
base Value
if (digit >= 'A' && digit <= 'Z') {
    return digit - 'A';
if (digit >= 'a') {
    return digit - 'a' + 26;
if (digit >= '0' && digit <= '9') {
    return digit - '0' + 52;
...