Here you can find the source of longToNBuf(long l, char[] chars)
private static StringBuilder longToNBuf(long l, char[] chars)
//package com.java2s; //License from project: Open Source License public class Main { private static StringBuilder longToNBuf(long l, char[] chars) { int upgrade = chars.length; StringBuilder result = new StringBuilder(); int last; while (l > 0) { last = (int) (l % upgrade); result.append(chars[last]);//from ww w.j a v a2 s.co m l /= upgrade; } return result; } }