Java Base64 base64Value(char digit)

Here you can find the source of base64Value(char digit)

Description

base Value

License

Apache License

Declaration

private static int base64Value(char digit) 

Method Source Code

//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;
    }
}

Related

  1. base64ToByteArray(String s)
  2. base64ToBytes(final String base64)
  3. base64ToBytes(String value)
  4. base64toInt(char c, byte[] alphaToInt)
  5. base64UrlFriendly(String base)