public static String convert ( long x , int n , String d ) { if ( x == 0 ) { return "0" ; } String r = "" ; int m = 1 << n ; m -- ; while ( x != 0 ) { r = d . charAt ( ( int ) ( x & m ) ) + r ; x = x >>> n ; } return r ; }
Converts number to string