List of utility methods to do Integer to
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) }; |
float | intToBlue(int color) int To Blue int blue = color & 0xff; return ((float) blue) / 255; |
void | IntToBuf2BE(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); |
void | intToBuffer(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; |
String | intToCodeString(int value) int To Code String return Integer.toString(value, RADIX);
|
String | intToColour(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 }; |
String | intToColumnName(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--; ... |
String | intToDateString(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); |
String | intToDay(int d) int To Day d = d % 7; switch (d) { case 0: return "Sun"; case 1: return "Mon"; case 2: return "Tues"; ... |