Java Base Encode toBase32Char(int i)

Here you can find the source of toBase32Char(int i)

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

  1. toBase16(int[] arr)
  2. ToBase16(StringBuilder str, byte[] data)
  3. toBase2(byte b)
  4. toBase26(int number)
  5. toBase2SuffixedString(long n)
  6. toBase36(int decimalNumber)
  7. toBase36(long l)
  8. toBase36(long num)
  9. toBase62(int decimalNumber)