Here you can find the source of arrayToString(int[] s)
public static String arrayToString(int[] s)
//package com.java2s; //License from project: Open Source License public class Main { /**/*w w w .j a v a2s .c om*/ * Translate an array of int-s specifying throw height into a String that * uses the normal siteswap notation. * * Example: * arrayToString([11,9,7,5,3,1]) returns "b97531" */ public static String arrayToString(int[] s) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < s.length; i++) { try { sb.append(intToChar(s[i])); } catch (Exception e) { return null; } } return sb.toString(); } /** * Translate between a throw height specified as an int and it's * representation in the alphabet we use to denote siteswaps (0 through Z). * * Example: * intToChar(12) returns 'c' */ public static char intToChar(int i) throws Exception { if (i < 0 || i > 35) throw new Exception("int out of bounds"); if (i < 9) return (char) ('0' + i); else return (char) ('a' + i - 10); } }