List of utility methods to do Unsigned Number Create
short | unsignedToSigned16(char value) Converts the specified unsigned 16 bit value to a signed 16 bit value. return (short) (value > Short.MAX_VALUE ? -(Character.MAX_VALUE - (value - 1)) : value); |
short | unsignedToSigned8(char value) Converts the specified unsigned 8 bit value to a signed 8 bit value. char workvalue = (char) (value & 0xff); return (short) (workvalue > Byte.MAX_VALUE ? -(255 - (workvalue - 1)) : workvalue); |
int | unsignedUnion2by2(final short[] set1, final int length1, final short[] set2, final int length2, final short[] buffer) Unite two sorted lists and write the result to the provided output array int pos = 0; int k1 = 0, k2 = 0; if (0 == length2) { System.arraycopy(set1, 0, buffer, 0, length1); return length1; if (0 == length1) { System.arraycopy(set2, 0, buffer, 0, length2); ... |
int | unsignedUpcast(short s) unsigned Upcast return s & 0xFFFF;
|
int | unsignedValue(byte signedByte) unsigned Value return signedByte & 0xff;
|
int | unsignedVLQSize(int value) unsigned VLQ Size if (value < 1 << 7) { return 1; if (value < 1 << 14) { return 2; if (value < 1 << 21) { return 3; ... |
String | unsignedZerofill(Integer number, int offset) Converts an integer to a unsigned zerofill representation specified by the given offset. String result = ""; while (result.length() < (offset - number.toString().length())) { result += "0"; return result + number.toString(); |
long | unsignL(byte value) Unsign the specified byte value and return it as long return value & 0xFFL;
|