List of utility methods to do Long to Base64 String Convert
String | toBase64(long value) Return a string containing a base-64 encoded version of the given long value. int low = (int) (value & 0xffffffff); int high = (int) (value >> 32); StringBuilder sb = new StringBuilder(); boolean haveNonZero = base64Append(sb, (high >> 28) & 0xf, false); haveNonZero = base64Append(sb, (high >> 22) & 0x3f, haveNonZero); haveNonZero = base64Append(sb, (high >> 16) & 0x3f, haveNonZero); haveNonZero = base64Append(sb, (high >> 10) & 0x3f, haveNonZero); haveNonZero = base64Append(sb, (high >> 4) & 0x3f, haveNonZero); ... |
long | longFromBase64(String value) Decode a base64 string into a long value. int pos = 0; long longVal = base64Values[value.charAt(pos++)]; int len = value.length(); while (pos < len) { longVal <<= 6; longVal |= base64Values[value.charAt(pos++)]; return longVal; ... |