Description
to Base Char
License
Apache License
Parameter
Parameter | Description |
---|
i | int 0 <= i < 32 |
Exception
Parameter | Description |
---|
ArrayIndexOutOfBoundsException | an exception |
Declaration
public static char toBase32Char(int i)
Method Source Code
//package com.java2s;
//License from project: Apache License
public class Main {
/**//from w ww . j a v a2 s . com
* No guarantee for minimum value of Character.MAX_RADIX :(
*/
private static final char[] BASE32_CHAR_FROM_INT = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b',
'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v' };
/**
* @param i int 0 <= i < 32
* @throws ArrayIndexOutOfBoundsException
*/
public static char toBase32Char(int i) {
return BASE32_CHAR_FROM_INT[i];
}
}
Related
- toBase16(int[] arr)
- ToBase16(StringBuilder str, byte[] data)
- toBase2(byte b)
- toBase26(int number)
- toBase2SuffixedString(long n)
- toBase36(int decimalNumber)
- toBase36(long l)
- toBase36(long num)
- toBase62(int decimalNumber)