Java Utililty Methods Integer From

List of utility methods to do Integer From

Description

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

Method

intIntFromRGB(int r, int g, int b)
Int From RGB
return r * 256 * 256 + g * 256 + b;
intintFromString(String str, int dflt)
Convert a string into an integer.
try {
    Integer val = Integer.valueOf(str);
    return val.intValue();
} catch (NumberFormatException nfe) {
    return dflt;
intintFromSyncSafeByteArray(byte[] buf, int offset, int len)
utility to generate an int from an array of bytes in syncsafe format.
int val = 0;
int v2 = 0;
for (int i = 0; i < len; i++) {
    val = val << 7;
    v2 = v2 << 7;
    int d = (char) (0x0000007F & buf[i + offset]); 
    int d2 = buf[i + offset];
    if (d2 < 0)
...
intintFromUnsignedByte(byte b)
int From Unsigned Byte
return (b < 0 ? b + 256 : b);