Java Utililty Methods Integer to

List of utility methods to do Integer to

Description

The list of methods to do Integer to are organized into topic(s).

Method

double[]int2double(int[] ia)
Converts a vector of ints to doubles.
double[] out = new double[ia.length];
for (int i = 0; i < ia.length; i++) {
    out[i] = ia[i];
return out;
Stringint2EyptStr(int num)
int Eypt Str
char[] tmp = new char[32];
int i = 0;
if (0 == num) {
    tmp[31] = '0';
    i = 1;
while (0 != num && i < 32) {
    int v = num % 32;
...
Floatint2float(Integer integer)
intfloat
return new Float(integer);
Integer[]int2Integer(int[] array)
int Integer
int len = array.length;
Integer[] temp = new Integer[len];
int count = 0;
for (int i : array) {
    temp[count++] = i;
return temp;
byte[]int2minBeb(final int x)
intmin Beb
if (x <= 0xFFFF) {
    if (x <= 0xFF) {
        if (x < 0)
            throw new IllegalArgumentException();
        return new byte[] { (byte) x };
    return new byte[] { (byte) (x >> 8), (byte) x };
if (x <= 0xFFFFFF)
    return new byte[] { (byte) (x >> 16), (byte) (x >> 8), (byte) x };
return new byte[] { (byte) (x >> 24), (byte) (x >> 16), (byte) (x >> 8), (byte) x };
Stringint2path(int v)
Int 2 path.
String id = v + "";
String str = "";
for (int i = 0; i < id.length(); i++) {
    str += id.charAt(i) + "/";
return str;
int[]int2rgb(final int color)
intrgb
return new int[] { (color >> 16) & 0xFF, (color >> 8) & 0xFF, color & 0xFF };
shortInt2Short(int i)
Int Short
short o;
try {
    o = new Integer(i).shortValue();
} catch (Exception e) {
    o = 0;
return o;
Stringint2sortableStr(int val)
intsortable Str
char[] arr = new char[3];
int2sortableStr(val, arr, 0);
return new String(arr, 0, 3);
char[]int2TwoChars(int i)
Converts an int into an array of two characters with the high bits in the first element and the low bits in the second element
char[] asChars = new char[2];
asChars[0] = (char) (i >>> 16);
asChars[1] = (char) (i & 0xFFFF);
return asChars;