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

byte[]intToBigEndianByteArray(int in)
int To Big Endian Byte Array
return new byte[] { (byte) ((in >> 24) & 0xFF), (byte) ((in >> 16) & 0xFF), (byte) ((in >> 8) & 0xFF),
        (byte) (in & 0xFF) };
floatintToBlue(int color)
int To Blue
int blue = color & 0xff;
return ((float) blue) / 255;
voidIntToBuf2BE(int val, byte[] buf, int offset)
Int To Buf BE
assert buf.length >= offset + 2;
buf[offset] = (byte) ((val >> 8) & 0xFF);
buf[offset + 1] = (byte) (val & 0xFF);
voidintToBuffer(int i, byte[] ioBuffer)
int To Buffer
ioBuffer[0] = (byte) (i >>> 24);
ioBuffer[1] = (byte) (i >>> 16);
ioBuffer[2] = (byte) (i >>> 8);
ioBuffer[3] = (byte) i;
StringintToCodeString(int value)
int To Code String
return Integer.toString(value, RADIX);
StringintToColour(int colour)
int To Colour
switch (colour) {
case 1:
    return "red";
case 2:
    return "darkgreen";
case 3:
    return "brown";
case 4:
...
int[]intToCols(int i)
int To Cols
return new int[] { (i >> 16) & 0xFF, (i >> 8) & 0xFF, i & 0xFF, (i >> 24) & 0xFF };
StringintToColumnName(int column)
int To Column Name
StringBuffer s = new StringBuffer();
column++;
while (column > 26) {
    int c = column % 26;
    column = column / 26;
    if (c == 0) {
        s.insert(0, 'Z');
        column--;
...
StringintToDateString(int i)
int To Date String
String s = Integer.toString(i);
if (i <= 9999) {
    return s;
if (s.length() < 8)
    return s.substring(0, 4);
return s.substring(0, 4) + "-" + s.substring(4, 2) + "-" + s.substring(6, 2);
StringintToDay(int d)
int To Day
d = d % 7;
switch (d) {
case 0:
    return "Sun";
case 1:
    return "Mon";
case 2:
    return "Tues";
...