Here you can find the source of toChar(int i)
private static char toChar(int i)
//package com.java2s; /*//from w w w . jav a 2 s . c om * This file is part of Dorado 7.x (http://dorado7.bsdn.org). * * Copyright (c) 2002-2012 BSTEK Corp. All rights reserved. * * This file is dual-licensed under the AGPLv3 (http://www.gnu.org/licenses/agpl-3.0.html) * and BSDN commercial (http://www.bsdn.org/licenses) licenses. * * If you are unsure which license is appropriate for your use, please contact the sales department * at http://www.bstek.com/contact. */ public class Main { private static char toChar(int i) { if (i >= 0 && i < 26) return (char) (i + 'A'); else if (i >= 26 && i < 52) return (char) (i + 'a' - 26); else if (i >= 52 && i < 62) return (char) (i + '0' - 52); else throw new IllegalArgumentException("Unsupported char code [" + i + "]."); } }