Here you can find the source of intToBase32(int n)
static String intToBase32(int n)
//package com.java2s; //License from project: Apache License public class Main { static final char[] BASE32_CHARS = "0123456789abcdefghijklmnopqrstuv".toCharArray(); static String intToBase32(int n) { char[] buffer = new char[7]; for (int i = 6; i >= 0; i--) { int x = n & 0x1f; buffer[i] = BASE32_CHARS[x]; n = n >> 5;//from w w w.j a va 2s .c om if (n == 0) { return new String(buffer, i, 7 - i); } } return new String(buffer); } }