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

byteint2(final int x)
int
return (byte) (x >> 16);
voidint2(StringBuilder buf, int i)
int
buf.append((char) ('0' + (i / 10) % 10));
buf.append((char) ('0' + i % 10));
Stringint2ABC(int index)
int ABC
int k = index;
int c;
StringBuffer abcBuf = new StringBuffer();
if (k == 0) {
    return "";
for (; k != 0;) {
    c = k % 26;
...
int[][]int2array(int sz, int seed)
intarray
int[][] ret = new int[sz][sz];
init(ret, seed);
return ret;
Byte[]int2ba(int integer)
intba
Byte[] result = new Byte[4];
result[0] = (byte) ((integer & 0xFF000000) >> 24);
result[1] = (byte) ((integer & 0x00FF0000) >> 16);
result[2] = (byte) ((integer & 0x0000FF00) >> 8);
result[3] = (byte) (integer & 0x000000FF);
return result;
byte[]int2BigEndianStr(int i)
int Big Endian Str
byte[] result = new byte[4];
result[3] = (byte) ((i >> 24) & 0xFF);
result[2] = (byte) ((i >> 16) & 0xFF);
result[1] = (byte) ((i >> 8) & 0xFF);
result[0] = (byte) (i & 0xFF);
return result;
byte[]int2buff(int n)
int convert to buff (big-endian)
byte[] bs;
bs = new byte[4];
bs[0] = (byte) ((n >> 24) & 0xFF);
bs[1] = (byte) ((n >> 16) & 0xFF);
bs[2] = (byte) ((n >> 8) & 0xFF);
bs[3] = (byte) (n & 0xFF);
return bs;
charint2Char(int i)
converts from 2-bit representation to character representation
switch (i) {
case 0:
    return 'A';
case 1:
    return 'T';
case 2:
    return 'G';
case 3:
...
Stringint2Date(Integer date, String interval)
int Date
String line = String.valueOf(date);
if (line.length() != 8) {
    return null;
} else {
    StringBuffer buf = new StringBuffer(10);
    buf.append(line.substring(0, 4));
    buf.append(interval);
    buf.append(line.subSequence(4, 6));
...
doubleint2ddouble(final int i)
intddouble
return (double) i;