Java Integer to intToEncodedID(int input)

Here you can find the source of intToEncodedID(int input)

Description

int To Encoded ID

License

Open Source License

Parameter

Parameter Description
input integer representing an event's ID

Return

Base64 encoded ID string

Declaration

public static String intToEncodedID(int input) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**//from   www  . j  av  a  2  s. c  o m
     * @param input integer representing an event's ID
     * @return Base64 encoded ID string
     */
    public static String intToEncodedID(int input) {
        int base = 36; // use base36 encoding (0-z)
        if (Character.MAX_RADIX < base) // just in case there are platforms with unusual MAX_RADIX
            base = 16; // revert to hex (0-F)
        return Integer.toString(input, base);
    }
}

Related

  1. intToDouble100000(int i)
  2. intToDoubleArray(int[] labels)
  3. intToEightByte(long value, byte[] dest, int off)
  4. intToEightHexString(final int value)
  5. intToEle(int integEle)
  6. IntToEnode62(Integer int10)
  7. IntToEnode62(Integer int10)
  8. intToFixedLengthString(int value, int length)
  9. intToFourByte(long value, byte[] dest, int off)