Here you can find the source of base64Value(char digit)
private static int base64Value(char digit)
//package com.java2s; //License from project: Apache License public class Main { private static int base64Value(char digit) { if (digit >= 'A' && digit <= 'Z') { return digit - 'A'; }//from ww w . j ava2 s . co m // No need to check digit <= 'z' if (digit >= 'a') { return digit - 'a' + 26; } if (digit >= '0' && digit <= '9') { return digit - '0' + 52; } if (digit == '$') { return 62; } // digit == '_' return 63; } }