Here you can find the source of encodeBase64Byte(byte base64Byte)
private static char encodeBase64Byte(byte base64Byte)
//package com.java2s; public class Main { private static char encodeBase64Byte(byte base64Byte) { if ((base64Byte >= 0) && (base64Byte <= 25)) { return (char) (base64Byte + 65); } else if ((base64Byte >= 26) && (base64Byte <= 51)) { return (char) (base64Byte - 26 + 97); } else if ((base64Byte >= 52) && (base64Byte <= 61)) { return (char) (base64Byte - 52 + 48); } else if (base64Byte == 62) { return '+'; } else if (base64Byte == 63) { return '/'; } else {//from ww w. j a v a 2 s. c o m return '0'; } } }